Hi,
I have a website where I am selling to customers in China. I have an online form where they can enter their information in chinese characters. Now the form works fine; data got submitted and stored in the mySQL database.
The problem is, when i go into mySQL database to view the records, the chinese characters that were entered by my customers are some were number coding system. My hosting provider told me i need some kind of special php functions to 'encode' and 'decode?' If I know what the heck they are or even know how to do it, that would help. Please help.....
All I need are three things
1. a code that shows how to ENCODE an input
2. a code that shows how to DECODE an input
3. where do i apply this encode and/or decode; do i have to set anything in my mySQL database?
Thank you.
Leon
UTF-8 Encoding and Decoding
Moderator: General Moderators
Code: Select all
mysql_query("SET NAMES = UTF8;");Note: Most people in China use either Big5 or GB2312 .. If their browser is obeying your HTML language declaration then the form data should be UTF8 .. but I've found a lot of the time that isn't the case. Data frequently gets messed up. If you find that happens, could you let me know the solution.
-
joesmithf1
- Forum Newbie
- Posts: 5
- Joined: Sun Jul 16, 2006 5:17 pm