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

Posted on 2006-05-11
Last Modified: 2012-06-27
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,
Question by:cristh
    LVL 8

    Expert Comment

    check this thread out, the same problem with hebrew...
    read it all the way down.
    check the link

    hope this helps.
    LVL 16

    Accepted Solution

    >>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

    Author Comment

    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,

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now