Bug #37806 Arabic unicode problem
Submitted: 2 Jul 2008 12:14 Modified: 2 Jul 2008 13:19
Reporter: Farag Ahmed Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Charsets Severity:S2 (Serious)
Version: OS:Windows (XP)
Assigned to: CPU Architecture:Any

[2 Jul 2008 12:14] Farag Ahmed
Description:
I am reading an Arabic data from text file and save them in mysql database using java. The problem some of the Arabic letters don't displayed correctly when read them from mysql table, although in java console they are displaying correctly. I did set my database Unicode to utf-8

Server char. - utf-8
DB char. - utf-8
client char. - utf-8
conn char. - utf-8

Please note that when I insert the Arabic text from java editor every thing is fine. But when I read it from text file with utf-8 Unicode and want to display the data in the browser or java console some Arabic letter are not recognized.
I use mysql 5 and i even try 6 with same problem.

I hope you will help us as Arabic users as we face real problem with the Unicode things with almost no help.
regards
Farag

How to repeat:
see description
[2 Jul 2008 12:19] Farag Ahmed
database unicode

Attachment: database unicode.JPG (image/pjpeg, text), 45.90 KiB.

[2 Jul 2008 12:21] Farag Ahmed
database unicode & the displayed text from database table

Attachment: database unicode and displyed text from dbase table.JPG (image/pjpeg, text), 55.56 KiB.

[2 Jul 2008 12:27] Susanne Ebrecht
Many thanks for writing a bug report.
Unfortunately, Windows don't has a UTF-8 support.

You can try the following:

Type in command Window of Windows: CHCP and Enter

Then you will get out something like: codepage 850

If CHCP will result you a code page that we support then make in MySQL CLI: "SET NAMES CPXXXX";

XXXX for the number of your code page.

After that try again.

If this won't work, then please look if the signs are really stored in UTF-8 in your database.

If you still have problems, please feel free to open this bug again.

But it makes no sense to reopen it, if your Windows use an unsupported code page or the code page your Windows is using isn't able to display Arabic signs. For example code page 850 isn't able to do that.
[2 Jul 2008 13:19] Farag Ahmed
Thanks for your answer, I did all but unfortunately it is the same problem. Please note that when I enter the text direct from the java editor and not from text file every thing is fine, the data is saved in mysql table without any problem and i can display it both in java console and in web broweser. the problem is when i read the data from text file and save it in mysql table, i can just display it correctly in java console but in windows not. Please note tha there are nilion web sites who save arabic text in mysql database and display it correctly on web broweser. I don't think that all enter the data direct from the editor ?
regards