Welcome to WebmasterWorld Guest from 54.167.175.218

Forum Moderators: open

MySQL Database Collation

Japanese EUC and Shift_JIS

   
4:27 pm on Feb 23, 2006 (gmt 0)

10+ Year Member



I'm trying to get Japanese characters to work correctly on a MySQL database table. I have done this for years with no problem, but now I'm working on a project on a different shared server that has the following MySQL settings when viewed through phpmyadmin:

Collation Connection: sjis_japanese_ci
Server Collation: ujis_japanese_ci
Collation Database: ujis_japanese_ci

I import the data into a table in Shift_JIS format (sjis), After importing the data everything looks fine when viewing through phpmyadmin (the Japanese characters look fine with the browser encoding set to Japanese Shift_JIS), but when I do queries on the database through php in my php applications, the data returned from queries is always returned as Japanese (EUC), and won't display correctly with the browser having Shift_JIS encoding.

I think this is because of the above Server Collation and Collation Databse settings which are using the EUC character sets (ujis_japanese_ci).

Has anyone experienced something like this? Is there a way that I can change the Server Collation and Collation Database to sjis_japanese_ci if this is a shared MySQL database, or is there some other way to be able to display the characters as Shift_JIS?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month