mysql utf8问题与法国字符

时间:2015-08-28 18:39:58

标签: mysql utf-8 collation mysql-5.6 utf8mb4

尝试在mysql(v 5.6)终端windows server 2008上的表中插入一个简单的'é',我得到错误的字符串值:列'colum_name'的'\ x82'

我一直在搜索堆栈溢出一天。我想我会发疯的。我的所有归类都是utf8mb4:

/*column*/
SHOW FULL COLUMNS FROM table_name;
utf8mb4_unicode_ci

/*database*/
show variables like "character_set_database";
utf8mb4

/*table*/
SHOW TABLE STATUS where name like 'table_name';
utf8mb4_unicode_ci

/*variables*/
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name            | Value              |
+--------------------------+--------------------+
| character_set_client     | utf8mb4            |
| character_set_connection | utf8mb4            |
| character_set_database   | utf8mb4            |
| character_set_filesystem | binary             |
| character_set_results    | utf8mb4            |
| character_set_server     | utf8mb4            |
| character_set_system     | utf8               |
| collation_connection     | utf8mb4_unicode_ci |
| collation_database       | utf8mb4_unicode_ci |
| collation_server         | utf8mb4_unicode_ci |
+--------------------------+--------------------+

这是我添加到my.ini

的内容
[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4 

[mysqld]
collation-server = utf8mb4_unicode_ci
character-set-server = utf8mb4
init-connect='SET NAMES utf8'

我被困了

1 个答案:

答案 0 :(得分:0)

  

我收到错误的字符串值:' \ x82'对于列' colum_name'

请解释一下。向我们展示查询。并SHOW CREATE TABLE

x82,在流行的latin1字符集中是逗号的变体:。它与e-acute无关(HEX:latin1:E9,utf8:C3A9)。