Thailanguage with php mysql

when I read the data from my sql in Thai language it show like this ทดสอบภาไทย
How can i solve this problem
teeraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

minichickenCommented:
Hi

Try this:
Set your web page charset encode to charset=utf-8 (unicode) like this:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

OR
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">

0
hernst42Commented:
Could you give more infromation, which mysql-server are you using, which php-version and which phpgroupware-version.
Is the correct code-page generated by phpgroupware for that page. Is your browser capable of displaying those characters?

Have you opend a bug-report at:
http://savannah.gnu.org/bugs/?group=phpgroupware
0
RoonaanCommented:
Well, in some way it seems that you execute some htmlspecialchars or htmlentities on the original string.

This could be pre-db-insertion or post-db-select, e.g. done before you submit data into the database, or after reading from the database.

It would be most welcome if you where able to check what's inside the actual database (using phpmyadmin or another tool.)
If the thai is htmlentities'd before inserting into the database this requires a whole other solution then when it is not.

Regards

-r-
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

teeraAuthor Commented:
I check on thai word that I type when it go to mysql database it change to  
&#3607;&#3604;&#3626;&#3629;&#3610;&#3616;&#3634;&#3652;&#3607;&#3618
0
minichickenCommented:
I think it is like that in the Database is because, the DB need to store Raw data and not encoded data.
Even if it stores the Thai characters like #3607;&#3604;&#3626;&#3629;&#3610;&#3616;&#3634;&#3652;&#3607;&#3618 when you extract them from the database and display them on the web page it should display the proper thai characters.
0
Bernard S.CTOCommented:
You need to be sure that all the whole chain is utf8.
That is:
1 - your php page being itself utf_8 encoded;
2 - this php page generates an html header described by minichicken in the FIRST lines of your html code
3 - when getting data from a db, you do the proper encoding to output text in utf-8
4 - when looking at the page with your browser this is using the code you have selected in the steps above.

Point 4: if you are using IE, "Dsplay" / "Code"  [Sorry, not sure this is the exact wording in English] and the check which code is currently active. Try to change it for UTF-8: is your page looking better?
Also look at the page source code: where is the line with "charset"? is it in the first lines?

Point 3: use phpMyAdmin to look at your data. you'll need to have the propre code setting in the right most frame. then check what you see.
If you find the &#3607;&# things, then that means that these characters are in the base (ie, &, #, 3, 6, 0, 7...)
All is not lost... use the mulitbyte strings functions http://www.php.net/mbstring to convert your "iso-type" of string to utf-8.
In some occasions, you'll need to do the reverse... so some trial and error seems required.

I have tested displaying your codes in my own browser, they display fine  B-)) well they look like thai charcaters but I am not an expert...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.