Bug #19637 utf8 character set not working
Submitted: 9 May 2006 13:57 Modified: 11 Jun 2006 12:01
Reporter: Ahmed Merchev Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.19 OS:Linux (Debian 3.1r1)
Assigned to: CPU Architecture:Any

[9 May 2006 13:57] Ahmed Merchev
We have a database on a server that contains English, Bulgarian and Arabic text. We tried to ensure at every turn that all text encoding is in utf8.

We add the following lines to /etc/mysql/my.cnf:
init-connect='SET NAMES utf8'

We have done this, and so these are our collation variables:

Variable   Session value   Global value
character set client        utf8       utf8
character set connection     utf8     utf8
character set database     utf8     utf8
character set results     utf8     utf8
character set server     utf8     utf8
character set system     utf8     utf8
character sets dir     /usr/share/mysql/charsets/    
collation connection     utf8_general_ci     utf8_general_ci
collation database     utf8_general_ci     utf8_general_ci
collation server     utf8_general_ci     utf8_general_ci

We use Debian 3.1r1 with Apache 2.0.55 and PHP 5.0.2 confugurated to use utf8, but MySQL 5.0.19_Debian don't use utf8 collation.

When we write Cyrillic in utf8 data base (e.g. "Изображения" - "Images" in Bulgarian), it is being written as "ИзображениÑ", but when we read utf8 coded Cyrillic from the data base, it is being visualised as "???????????".

How to repeat:
I think that the problem is due to that despite of the settings done in /etc/mysql/my.cnf of MySQL 5.0.19_Debian for using utf8, it continues to use latin1 by default!

(E.g. if you visualis the word "Изображения" - "Images" in Bulgarian) coded with utf8 with coding ISO-8859-1, it will appear in the following way: "ИзображениÑ")
[11 May 2006 12:01] Valeriy Kravchuk
Thank you for a problem report. Please, try to check with a mysql command line client (not PHP, for now) and inform about the results. Check on a newer version, 5.0.21, if possible.
[11 Jun 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".