homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

MySQL Database Collation
Japanese EUC and Shift_JIS

10+ Year Member

Msg#: 334 posted 4:27 pm on Feb 23, 2006 (gmt 0)

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?


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved