Bug #14112 UTF-8
Submitted: 18 Oct 2005 10:34 Modified: 19 Oct 2005 16:41
Reporter: Robert Reichel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.4. beta-nt OS:Windows (Windows XP)
Assigned to: MySQL Verification Team CPU Architecture:Any

[18 Oct 2005 10:34] Robert Reichel
Description:
When I try to insert text with UTF-8 encoding in my table (in which DEFAULT CHARSET=utf8) the following replacements are made:

'ÄŤ' ('č' or 'č') is converted to 'Ä?'
'”' ('”' or '”') is converted to 'â€?'

The characters 'Ť' and 'ť' are rejected by MySQL server.

My browser (IE) supports UTF-8 encoding and letters encoded with 'č' and '”', but MySQL server does not.

I use UTF-8 character set for Croatian language. Croatian language have same letters like Slovenian, Serbian, Bosnian, Macedonian and some other languages. The letter 'č' ('č') is used in these languages. More then 30 million people are using this letter and I think this problem should be solved.

Robert

How to repeat:
Create MySQL table:

CREATE TABLE `mytable` (
  `Title` varchar(255) character set utf8 collate utf8_bin NOT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

Try to insert the folowing letters 'č' and '”'
[19 Oct 2005 16:41] MySQL Verification Team
Looks to me that is an terminal client issue, having that like the Linux
terminal konsole I was unable to repeat:

mysql> select * from mytable;
+---------+
| Title   |
+---------+
| ” |
| ÄŤ    |
+---------+
2 rows in set (0.01 sec)

mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.0.16-debug |
+--------------+
1 row in set (0.01 sec)

mysql>
[20 Oct 2005 6:55] Robert Reichel
This test was made using Windows XP command prompt.

Maybe you should try on Windows XP platform. I have tried once again with same result.
[23 Dec 2005 13:19] thierry mounier
I had similar problems with PHP 5.1.1, mysql 5.0.16, and apache 2.0.55.
All the transactions from/to the browser in UTF-8 were wrong. I just typed :
mysql_query("SET NAMES 'utf8'");
after the line
mysql_select_db($this->database);
and all my problems were resolved.
Thym