hugo84 Posted January 29, 2009 Share Posted January 29, 2009 Hi i have a problem i did a program that retrieves record from a thai database to show out in my program. However the info i retrieved is supposed to show in Thai language but it displays in my screen as ????, How could i solve this language display issue? what is the problem? Please help this is an urgent issue. thank you very much Link to comment https://forums.phpfreaks.com/topic/142948-php-query-thai-language-problem/ Share on other sites More sharing options...
Mchl Posted January 29, 2009 Share Posted January 29, 2009 You have to set proper encoding for your database connection and for your generated content. Most likely it will be utf-8 Link to comment https://forums.phpfreaks.com/topic/142948-php-query-thai-language-problem/#findComment-749508 Share on other sites More sharing options...
printf Posted January 29, 2009 Share Posted January 29, 2009 before running your query, right after you select your database, run this query before anything else... // connect to your database server mysql_connect ( 'server', 'user', 'pass' ); // select your database to query mysql_select_db ( 'some_database' ); // this is the query to run befor doing anything else... mysql_query ( 'SET NAMES utf8' ); // now do your normal query requests... Link to comment https://forums.phpfreaks.com/topic/142948-php-query-thai-language-problem/#findComment-749510 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.