Forum Moderators: open
I'm trying to make a japanese website using php and mysql.
I've created tables using phpmyadmin with sjis_japanese_ci as collation. But when i insert data(text) from from(pages are using shift_jis charset) i see?s? (some weird characters) in phpmyadmin.
But if i insert data in a blob feild the data shows properly when i display it in a page. Then i changed the feild from blob to text, the japanese text was displayed properly.
how do i store sjis data in mysql and display it?
Please help
Thanks
Need to make page in Japanese [webmasterworld.com]
We have done some basic stuff with MySQL and php. We used Shift-JIS. The trick seemed to be getting the data into the data base in the Shift-JIS format.We found if you run MyphpAdmin in japanese (s-JIS) and then do a text import (selecting the Shift-JIS encoding) it works fine.
i had used utf8 earlier for another website and it worked fine, now i want to use sjis, i have to get data from form and store in mysql,pages are in shift_jis encoding, but when i try to save it in mysql i get weird characters,
eg:
$sql = 'INSERT INTO tb1 (last_name) VALUES ("マーチ支店")';
i get "?}?[?`?x店"
When i use phpmyadmin it works fine, if i change it to blob feild it works fine. if i change it to blob, insert data and then change to text it shows properly.
please help.
Thanks