Forum Moderators: coopster

Message Too Old, No Replies

PHP and MySQL character encoding

         

DrDoc

10:32 pm on Jun 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a database that needs to be able to store cyrillic characters (Russian).

How can I ensure that they are all stored properly? Can I change the charset for the table only, or do I have to change the charset for the entire database? Or, is there a PHP solution?

Birdman

10:39 pm on Jun 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello DrDoc,

At first glance, it looks like you need admin privs to set it up, unless it's already configured...

Mysql.com:

You can change the character set with the --default- character-set option when you start the server. The character sets available depend on the --with- charset=charset and --with-extra-charsets= list-of-charset ¦ complex ¦ all options to configure, and the character set configuration files listed in `SHAREDIR/charsets/Index'.

The Character Set Used for Data and Sorting [mysql.com]

Birdman

DrDoc

11:19 pm on Jun 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So, maybe my best bet is to convert all characters to unicode entities first then...

Христианин

daisho

1:29 pm on Jun 24, 2003 (gmt 0)

10+ Year Member



I think that's your best solution.