1 Reply Latest reply on Feb 9, 2007 4:33 AM by chris.huston.t10

    Can not display thai langage in combobox

    Alphonse Mc Clouds
      I query it from mysql by php set chrast to tis620 or utf8, Itry to set code both tis620 and tuf8 in flex but it not work please help.
        • 1. Re: Can not display thai langage in combobox
          chris.huston.t10 Level 3
          Without knowing how your PHP/MySQL are set up it is hard to say exactly, but try this in your PHP script:
          If you are using the mysqli extension:
          $link = new mysqli('localhost', 'mysql_user', 'mysql_password', 'database');
          $rtn = $link->query("SET NAMES utf8");

          If you are using the older mysql extesion use this:
          $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
          $result = mysql_query("SET NAMES utf8");

          Finally, you can try this if necessary to make sure you are returning the value in utf-8 to Flex:
          $label = mb_convert_encoding($mysql_value, "utf-8", "auto");

          I use a MySQL database (version 4.1) with PHP 5.1 and use the above code when working with Japanese characters, so the same should work for Thai, but you might need to make a few changes.

          Vygo