Bug #5340 MySQL Administrator and Querybrowser are failed to encode Thai language
Submitted: 1 Sep 2004 11:22 Modified: 6 Oct 2004 12:14
Reporter: Soraj Tasanacharoen Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.0.12 OS:Windows (Windows XP)
Assigned to: Michael G. Zinner CPU Architecture:Any

[1 Sep 2004 11:22] Soraj Tasanacharoen
Description:
Usually thai language 's encode by Windows-874 
but in Mysql Admin use UTF-8

so error was occur :-( 

sorry im use eng not well 

thanks you

How to repeat:
..

Suggested fix:
dont know
[1 Sep 2004 12:22] Michael G. Zinner
MySQL Administrator and MySQL Query Browser use UTF8 internally. 

But that should not be a problem. Could you describe your problem in more detail?

A common mistake is, to have databases in the (default) latin1 charset. To work with databases that are not latin1 or UTF8 you have to set the collation correct:

ALTER DATABASE your_database CHARACTER SET tis620 COLLATE tis620_thai_ci;

Note that you need at least MySQL 4.1.1 do to this.

Please report if this does help you of if you have a different problem.
[3 Sep 2004 6:10] Soraj Tasanacharoen
the error that i've said is..

when i input data in GUI of MysqlQueryBrowser with thai language it can type and see correctly.
but when i want to fetch the data to my website , it can't read, coz.. 
almost thai language website use 

<meta http-equiv="Content-Type" content="text/html; charset=windows-874">

(and some use TIS-620)
in meta tags.  so .. when fetching data with UTF-8 format in to windows-874 page the error was occur -_-'

so how'ld i do .  

PS. Now i can only use Phpmyadmin to input data coz it use charector endcoding from IE (i think) .

... thanks you
[16 Sep 2004 17:12] Michael G. Zinner
Would it be possible to use the php iconv functions?

<?php
echo iconv("UTF-8", "windows-874", "This is a test.");
?>
[28 Apr 2005 9:22] PanutsMan
I failed to use Thai in MySQL 4.1.10 with PHP 5.0.3 on Apache 2.0.53 of Win system. 
It's work when I put the data into MySQL by phpMyadmin(2.6.x) interface but when looking from the published web site my Thai font are ??????. 
After I tried to search and solved the problem I found that it can fixed by use PHP 4.x.x instead of 5.x.x.
I don't know why but I can work it out.
May you tell me why, please.
[19 May 2005 6:25] sdf sf
Greeting.
 I don't think it is mysql's bug. I managed mysql through phpMyAdmin 2.6.1-pl3, mysql 4.1.9. I couldn't read and edit Thai text through phpMyAdmin. Searching for the solution I found that it was because Mysql4.1 new feature "Chapter 10.Character Set Support" ,someting needed to do with "Collation , Character Set".
 Now, how to solve the problem.
I believe most of the data that update through web stored in ANSI encoding(1byte)
1. you can just update,edit,fetch data and do almost everyting though your scripts but not through phpmyadmin. you may lose your data in the field you try to change Collation type.
2. if you want your data appear correctly both in phpmyadmin and the query scripts
you may need to update your data on the database...here is what I did
-dump the data by click at export, the data still in alien language...
-copy all of it to notepad, the data still in alien language...
-copy all of the data in "Notepad" to EditPlus, now the data appear in Thai.
-edit DEFAULT CHARSET to DEFAULT CHARSET=tis620
-save as UTF-8 or paste it in the query text field and run the query.

now your data become some kind of unicode, to acquire and store data correctly you need to add this command line in your scripts.

$charset="SET NAMES 'tis620'";
mysql_query($charset) or die('Invalid query: ' . mysql_error());

if you are Thai please follow the link for more info.
http://www.phpconcept.com/index.php?option=content&task=view&id=21&Itemid=28

http://www.appservnetwork.com/yabbse/index.php?board=2;action=display;threadid=1437

and checkout Mysql manual Chapter 10. Character Set Support.

may fraud be with you Q(-.-Q)