Forum Moderators: coopster

Message Too Old, No Replies

Need to allow Japanese input into MySQL db

input/output of Japanese text = problem?

         

louponne

2:35 pm on Oct 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a site with several dynamic sections and now need to add a Japanese version of one of the parts, so need to make a form to input text and then display it on a couple of pages. Is this going to be a problem, to input, store and then output text in Japense via PHP/MySQL?

jatar_k

5:39 pm on Oct 11, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



not sure myself though we may be doing some chinese soon so I should really be paying attention. ;)

MySQL -National Character Sets and Unicode [mysql.com]

that looks like the proper chapter.

louponne

7:09 pm on Oct 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hm, the manual talks about mysql version 4.1

I just ran a phpinfo() and see on the host we're using, it's MySQL 3.22.32

Does this mean I'm out of luck? :((

louponne

9:57 pm on Oct 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello? Does anyone at all have experience on this?

Timotheos

10:21 pm on Oct 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've worked with Japanese and mySQL but not at the same time so take this for what it's worth :-)

I think there would be no problem storing the characters and pulling them out. I perceive the problem comes in using any sort/search features of mySQL as Japanese characters sets are double bytes. So one Japanese character will look like this ¤Î in your database and on the web page.

I would also think that there would be easy ways to program around this by using unique ids, dates, etc to control your data.

louponne

6:52 am on Oct 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the answer, Timotheos. I'm hoping you're right, but since the manual goes into some detail about character sets, I'm a bit worried!