Forum Moderators: phranque

Message Too Old, No Replies

Japanese Form Response Displays "Garbage"

Japanese Form Encoding

         

walrus1

6:40 am on Jun 6, 2004 (gmt 0)

10+ Year Member



Hi All. I am trying to work out why my form won't accept Japanese text. All the fields work work fine with English text but anything typed in Japanese just turns out gibberish. I cannot find a tutorial anywhere that explains how my form should be set up to accept both English and Japanese. The only part of the html form I have altered to accept Japanese is in the head where I have inserted this:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-2022-JP">
<meta http-equiv="Content-Transfer-Encoding: base64">

I am not sure whether my PHP script needs to be altered to accept Japanese? From what I gather the PHP script only relays the content of the Form which all displays fine in the browser.

Any help with this greatly appreciated.

outrun

8:36 am on Jun 6, 2004 (gmt 0)

10+ Year Member



Welcome to webmasterworld walrus1

[php.net...] may help you out if your having character encoding problems.

regards,
Mark

walrus1

11:53 pm on Jun 6, 2004 (gmt 0)

10+ Year Member



Thanks for your help Outrun. The link was very informative and I think I have been on the wrong track with searching for a solution to the problem. It seems like the ISP has to enable mbstring to accept different character sets. More recent versions of PHP have it enabled by default but not older versions. I have contacted the ISP and they are looking into it. Thanks again for pointing me in the right direction.

bill

6:52 am on Jun 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...not sure if this will help in your case, but have you tried different Japanese encodings? I don't see ISO-2022-JP all that often.

shift-jis
x-sjis
x-euc
x-euc-jp

or maybe utf-8

Also try it without this line:

<meta http-equiv="Content-Transfer-Encoding: base64">

and see what happens.

walrus1

7:09 am on Jun 7, 2004 (gmt 0)

10+ Year Member



Thanks Bill. Guess what...it originally had Shift-JS with the other line removed. I have tried all types of combinations. Apparently the ISP needs to enable MBSCRIPT or something in the PHP.ini but I haven't heard back from them yet? Thanks again for your assistance

Cheers
Lance