Loading ...
Sorry, an error occurred while loading the content.

Re: problem with my language unicode (Khmer Unicode)

Expand Messages
  • Calvin
    I was facing a similar problem with the rich text editor control with foreign characters. In my CMS, the data is fetched and displayed through the YUI
    Message 1 of 6 , Feb 2, 2008
    • 0 Attachment
      I was facing a similar problem with the rich text editor control with
      foreign characters. In my CMS, the data is fetched and displayed
      through the YUI datasource control, and that works fine, but when
      displaying the data directly via PHP, it was giving me those funny
      characters similar to what you were experiencing.

      I know that Thomas already helped you find a solution to the problem,
      but I just wanted to post an alternate solution which may be simpler
      to implement. Basically, when you pull the data from the database
      using PHP, just use utf8_decode() (see:
      http://us2.php.net/manual/en/function.utf8-decode.php) to decode the
      string before you display it on the page.

      so my PHP solution basically looks something like this:
      $qid = mysql_query($query);
      if ($res = mysql_fetch_object($qid)) {
      print(utf8_decode($res->content));
      }

      --- In ydn-javascript@yahoogroups.com, "Sorn Sunsocheth"
      <khmersocheth@...> wrote:
      >
      > In my datatable field i have implemented incell editing and i want to
      > type in my own language which is in unicode.
      >
      > Everything is fine in input box of cell editing and after clicking OK
      > of the cell editing the cell of datatable also show my language
      > characters. But when i refresh the page to get my data back from
      > database my language character become សសេហthese unknown
      > character.
      >
      > If i do submit form in normal way of HTML without YUI everything is
      > OK. So is there anyway to solve this or do i have to configue anything
      > more in YUI.
      >
      > Best wish
      > Socheth
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.