• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 600
  • Last Modified:

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,
Cristh
0
cristh
Asked:
cristh
1 Solution
 
Yuval_ShohatCommented:
check this thread out, the same problem with hebrew...
http://www.experts-exchange.com/Databases/Mysql/Q_21814019.html
read it all the way down.
check the link
http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html

hope this helps.
-=Yuval=-
0
 
ellandrdCommented:
>>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

http://bugs.mysql.com/bug.php?id=5340
http://accurapid.com/journal/10intlweb.htm
0
 
cristhAuthor Commented:
After follow link http://bugs.mysql.com/bug.php?id=5340
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

http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html

Thank you all for your support,
Cristh.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now