Import Data in Thai language failure, it's show "???".

I have data that it can view in thai language on PhpMyAdmin. When I import with php, it show as "?" character.

the code is same here :

<?php echo $dbarr['name'] ; ?>

The data in field 'name' is in Thai Language.
But when it show by the 'echo', output is show the wording '?????    ????'

How can I fix it ?

Best Regards,
Who is Participating?
>>The data in field 'name' is in Thai Language.
>>But when it show by the 'echo', output is show the wording '?????    ????'

this is most probably caused by the meta tag contain the charset.

in your PHP page you need to change your charset to asian charset.

Usually thai language 's encode by Windows-874 but in Mysql Admin use UTF-8
check this thread out, the same problem with hebrew...
read it all the way down.
check the link

hope this helps.
cristhAuthor Commented:
After follow link
It's great !

The answer is just use 2 lines of coding after connect a database to config the input and output charactor code as 'tis620' :

$charset="SET NAMES 'tis620'";
mysql_query($charset) or die('Invalid query: ' . mysql_error());

I think it also apply to another character set as assist by Yuval at

Thank you all for your support,
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.

All Courses

From novice to tech pro — start learning today.