Jump to content

Php/mysql Problem With Thai Langue


Recommended Posts

Posted

I would like to make an English/Thai website

I get a table here english and thai words are submitted into (as a dictionary)

In my phpmyadmin/mysql table, the english shows correct and also does the Thai characters

when I want to output this in a webpage in PHP, I got my english normal but my Thai equivalent shows as ?????? in stead of thai characters

I used utf8 or windows 874 als page definition, but no difference

anyone that could help me ?

Posted
In my phpmyadmin/mysql table, the english shows correct and also does the Thai characters

when I want to output this in a webpage in PHP, I got my english normal but my Thai equivalent shows as ?????? in stead of thai characters

I used utf8 or windows 874 als page definition, but no difference

To make much progress, we need to know:

(1) The content of the META http-equiv=Content-Type tag on the generated web page.

(2) The sequence of bytes actually emitted for the Thai text.

Does overriding the encoding in the browser make any difference? Which browsers were you using? Did you really see a row of question marks? If you got question marks it looks as though something emitted Windows 874 when UTF-8 was expected. I take it your browser can display Thai, and will do so even if the web page specifies a font with no Thai characters.

Posted

ํYou need to set the charset/collation in Mysql too, that can be quite confusing as it can be done at server, table and/or column level. The default is Swedish as far as I remember.

Also php doesn't support Unicode, so if you're storing the data in UTF-8 and then using string manipulation functions in php that could cause problems. Maybe that's what phpmyadmin is doing ? Could be worth trying using www.sqlyog.com too and see if the problem still happens.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...