Bug #8940 Can't insert character ® into table
Submitted: 4 Mar 2005 4:27 Modified: 24 Mar 2005 12:46
Reporter: Jhi-Yong Bhang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.7 OS:Linux (RedHat 9)
Assigned to: CPU Architecture:Any

[4 Mar 2005 4:27] Jhi-Yong Bhang
Description:
while I working on web-board program, I found that I can't insert a character '®' into the table.

******** below is short test which explains the problem ********

mysql> desc test2;
+---------+------+------+-----+---------+-------+
| Field   | Type | Null | Key | Default | Extra |
+---------+------+------+-----+---------+-------+
| content | text |      |     |         |       |
+---------+------+------+-----+---------+-------+
1 row in set (0.01 sec)

mysql> select * from test2;
Empty set (0.00 sec)

mysql> insert into test2 values ('®');
Query OK, 1 row affected (0.01 sec)

mysql> select * from test2;
+---------+
| content |
+---------+
|         |
+---------+
1 row in set (0.00 sec)

mysql> insert into test2 values ('abcd®efgh');
Query OK, 1 row affected (0.01 sec)

mysql> select * from test2;
+---------+
| content |
+---------+
|         |
| abcd    |
+---------+
2 rows in set (0.00 sec)

***** Server Character set is shown below *******

mysql> show variables like 'c%';
+--------------------------+----------------------------------------+
| Variable_name            | Value                                  |
+--------------------------+----------------------------------------+
| character_set_client     | euckr                                  |
| character_set_connection | euckr                                  |
| character_set_database   | euckr                                  |
| character_set_results    | euckr                                  |
| character_set_server     | euckr                                  |
| character_set_system     | utf8                                   |
| character_sets_dir       | /usr/local/mysql/share/mysql/charsets/ |
| collation_connection     | euckr_korean_ci                        |
| collation_database       | euckr_korean_ci                        |
| collation_server         | euckr_korean_ci                        |
| concurrent_insert        | ON                                     |
| connect_timeout          | 5                                      |
+--------------------------+----------------------------------------+

How to repeat:
try to insert '®' into table...^^
[24 Mar 2005 5:21] Jorge del Conde
please search our manual for string literals.
[24 Mar 2005 12:46] Sergei Golubchik
This character - 0xAE - is not a valid euckr character, it can only be a first byte in multibyte sequence.

So, when you enter it alone, it is rejected as an invalid character.
[27 Aug 2009 18:21] Peter Gulutzan
Actually the problem was that we didn't support A2E7
in euckr. In a forthcoming version of MySQL we will
support A2E7. See the worklog task high level architecture
http://forge.mysql.com/worklog/task.php?id=3997