Bug #37724 | Currency symbols like € are not recogonized | ||
---|---|---|---|
Submitted: | 29 Jun 2008 7:03 | Modified: | 30 Jul 2008 11:48 |
Reporter: | albert arul prakash rajendran | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S1 (Critical) |
Version: | 5.1 | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any | |
Tags: | €, euro currency, euro symbol |
[29 Jun 2008 7:03]
albert arul prakash rajendran
[29 Jun 2008 7:05]
albert arul prakash rajendran
I am not sure which Character set supports Euro symbols and other currency symbols. If Mysql comes with a currency table (DDL) and insert data (DML) then it will be a great help for all developers like me. Thanks Albert Arul Prakash http://www.bepenfriends.com
[30 Jun 2008 8:08]
Susanne Ebrecht
many thanks for writing a bug report. With my first test I could reproduce it but making the test a second time, I couldn't reproduce. I have to get deeper into this.
[30 Jun 2008 8:42]
Susanne Ebrecht
Ok I just started to make lots of tests on 5.1-bzr-tree. Here is the first of my tests: Connection 1: TERMINAL: UTF8 Open MySQL CLI create database bug37724latin1 character set latin1; \u bug37724latin1 create table tlatin1myisam(t varchar(10))engine=myisam; create table tlatin1innodb(t varchar(10)) engine=innodb; set names utf8; show variables like 'char%'; +--------------------------+------------------------------------------------+ | Variable_name | Value | +--------------------------+------------------------------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | latin1 | | character_set_system | utf8 | insert into tlatin1myisam values('€'); insert into tlatin1innodb values('€'); select length(t) from tlatin1myisam; +-----------+ | length(t) | +-----------+ | 1 | +-----------+ select length(t) from tlatin1innodb; +-----------+ | length(t) | +-----------+ | 1 | +-----------+ select * from tlatin1innodb; +------+ | t | +------+ | € | +------+ select * from tlatin1myisam; +------+ | t | +------+ | € | +------+ Connection 2: Terminal: ISO-8859-15 Open CLI: \u bug37724latin1 set names latin1; show variables like 'char%'; +--------------------------+------------------------------------------------+ | Variable_name | Value | +--------------------------+------------------------------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 select * from tlatin1innodb; +------+ | t | +------+ | | +------+ select * from tlatin1myisam; +------+ | t | +------+ | | +------+ In my CLI it looks like "nothing" or better like ''. That there is a sign, I just figured out by copy-paste here.
[30 Jun 2008 8:49]
Susanne Ebrecht
Test 2: vice versa to test 1: TERMINAL ISO-8859-15 plus set names latin1: same database: bug37724latin1 with latin1 as default character set. create table t2latin1innodb(t varchar(10))engine=innodb; create table t2latin1myisam(t varchar(10))engine=myisam; insert into t2latin1myisam values('€'); insert into t2latin1innodb values('€'); select length(t) from t2latin1myisam; +-----------+ | length(t) | +-----------+ | 1 | +-----------+ select length(t) from t2latin1innodb; +-----------+ | length(t) | +-----------+ | 1 | +-----------+ select * from t2latin1myisam; +------+ | t | +------+ | € | +------+ 1 row in set (0.00 sec) select * from t2latin1innodb; +------+ | t | +------+ | € | +------+ Other connection: Terminal UTF8 plus SET NAMES UTF8: select * from t2latin1myisam; +------+ | t | +------+ | ¤ | +------+ select * from t2latin1innodb; +------+ | t | +------+ | ¤ | +------+
[30 Jun 2008 9:11]
Susanne Ebrecht
Test 3: Terminal UTF8 and SET NAMES UTF8: create database bug37724utf8 character set utf8; \u bug37724utf8 create table tutf8myisam(t varchar(10))engine=myisam; create table tutf8innodb(t varchar(10))engine=innodb; insert into tutf8myisam values ('€'); insert into tutf8innodb values('€'); select length(t) from tutf8myisam; +-----------+ | length(t) | +-----------+ | 3 | +-----------+ select length(t) from tutf8innodb; +-----------+ | length(t) | +-----------+ | 3 | +-----------+ select * from tutf8myisam; +------+ | t | +------+ | € | +------+ select * from tutf8innodb; +------+ | t | +------+ | € | +------+ Other connection: Terminal ISO-8859-15 plus SET NAMES LATIN1: \u bug37724utf8 select * from tutf8myisam; +------+ | t | +------+ | | +------+ select * from tutf8innodb; +------+ | t | +------+ | | +------+ Same as on test 1 here. In my terminal I see no sign ... it looks like ''.
[30 Jun 2008 9:15]
Susanne Ebrecht
I think I can stop testing here. Problem: Euro sign needs 3 bytes in UTF8. My suggestion is for converting from UTF8 to LATIN1 there is only a check for 2 byte signs not for 3 byte signs.
[30 Jun 2008 11:48]
Susanne Ebrecht
This is apparently not a bug. The reason why it fails on Linux is different to the reason why it fails here for you. You are using Windows. Please figure out first, which client encoding your Windows is using. Just type in a command Window: CHCP if your windows is using code page 850 then you have to make "SET NAMES CP850" first. Only if it use code page 1252 then you can use "SET NAMES LATIN1". The problem here is, that the Windows encoding must have the possibility to display the Euro sign and that's only possible when you tell the system, what encoding your windows is using.
[30 Jun 2008 11:55]
Susanne Ebrecht
The Linux problem is at bug #37738
[30 Jul 2008 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".