Japanese Kanji in forms and passing via POST

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cesarcesar
Forum Contributor
Posts: 111
Joined: Mon Oct 18, 2004 3:28 pm

Japanese Kanji in forms and passing via POST

Post by cesarcesar »

I hope this question is in the right forum. I figured since the end result is a PHP result it fits here.

I have a normal HTML form. In it are text fields. Some of my customers will be filling the form with Kanji and Katakana characters. The form shows as filling fine, but when submitted, the returning POST values are empty. I have checked all over the web and i just cant seem to find anything about what I'm missing.

I do have meta tag

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Any help is much appreciated. Thanks.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Japanese Kanji in forms and passing via POST

Post by Eran »

show us the actual form, so we could try and figure out what's missing
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: Japanese Kanji in forms and passing via POST

Post by Apollo »

1. Try to include accept-charset='utf-8' in your form tag, for example:

Code: Select all

<form name='MyHappyForm' method='post' accept-charset='utf-8' action='SendToMommy.php'>
....
</form>
2. Make sure your html's content-type meta tag isn't overridden by some default Apache content-type header. Submit your form's URL on a random header inspection page and see if there's no funny charset specification in your server's headers.
Post Reply