Japanese Forms
Read With Formatting | Free Open Source Tutorials Account
PHP Development
Thread: Japanese Forms
walrus
Hi all. Hope this post is in the right place. I have used a PHP form processor and it works great except now I have just used the script for a japanese site and the form submissions are illegible. I have done some research but can't find out exactly what I need to change to maintain the japanese formatting. Is it the enctype or is it something in the php script that needs to be altered. At present I only have changed the initial form values to <form action="form.php" method="post" enctype="multipart/form-data" name=form onSubmit="return check()" >. I think something has to be added for Japanese text. Could someone please explain how to get this form to display properly or point me in the direction of a good tutorial that will help me. I really have no idea about php or the enctype properties. Many thanks in advance.
md_doc
I just noticed your post and am going to do some testing tomorrow night to help get the answer for you. But in theory, php just takes the data that is passed to it and that is pretty much it. I am thinking it might be the database you are putting it into that does not support the language but again I will do some testing and post the results Monday night.
md_doc
I did some testing and I could not figure it out off hand. I will look into it more when time allows but if anyone else knows the answer please let us know.
walrus
Thanks for helping MD. OK, a few things you mentioned might be putting me on the right track. The html page the form resides on has this in the head
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
I take it that this converts japanese characters which work fine when filling out the form.
The form is not being submitted to a database. This makes me think you saw something in my script that is only related to databases?
The form was made by someone else and only had a "mailto" to process it which worked fine. Wish I hadn't recommended changing it now lol.
Anyway, if anyone has an answer to this problem, please let me know.
md_doc
I just noticed that the form tag accepts a keyword "accept-charset" maybe you need to do that?
ALthough I went to a few japanise sites and they do not do anything special in their forms... so this is weird. Let me know if you have already figured it out though please.
muttonman
I am experiencing the same problem with my forms. Did you find a fix for the problem?
scottious
Hi Guys, I was having the same problem but found a solution from someone posting on another forum.
So here' the solution.
Curtosey of http://php.planetmirror.com/manual/en/function.mb-send-mail.php
bredfern at calarts dot edu
23-Jun-2004 08:07
Make sure that if you're using a form to type in the mail, that your form page has the right encoding, like if I want to send out a japanese email, by filling out a form, the form page needs this in the header:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=SHIFT-JIS">
So there tis. I had been looking for almost 2hours for that one!
Scott. :)