MySQL Forums
Forum List  »  PHP

collation & encoding - for Shift-JIS
Posted by: ben taylor
Date: October 02, 2007 05:06AM

Hi,
I am a MySql novice, though I have successfully created and implemented a multi-table database for a web application of mine in the past. ( http://www.language-global.com/links-main.php - it will seem incredibly amateurish to most people here I am sure ).

The problem I would like to seek help with is to do with collation and encoding. My database will include a single table ( very simple ) with one field which will contain characters in Japanese.
The page encoding for all pages in this application is Shift-JIS ( most common encoding in Japan ), and I have set the collation for every field in my table as sjis ( which I believe is Shift-JIS ). However, when examining the table in phpMyAdmin, the japanese field shows as garbage (?^?, etc) and when I retrieve the field from the database in my application I get garbage, too.
I am using stripslashes() and htmlspecialchars() on the japanese variable before sending it to the database, but this does not help the problem.

I don't know how many people out there are familiar with this kind of problem with Japanese text, but I am hoping someone will be able to suggest something that might help me.

I forgot to add my server uses MySQL verson 4.1.20-standard.



Edited 1 time(s). Last edit at 10/02/2007 05:10AM by ben taylor.

Options: ReplyQuote


Subject
Written By
Posted
collation & encoding - for Shift-JIS
October 02, 2007 05:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.