gpt4 book ai didi

带有法语字符的mysql utf8问题

转载 作者:行者123 更新时间:2023-11-30 22:36:58 27 4
gpt4 key购买 nike

尝试在 mysql (v 5.6) 终端 Windows Server 2008 上的表中插入一个简单的 'é',我得到不正确的字符串值:'\x82' 用于列 'colum_name'

我已经在堆栈溢出上搜索了一天。我想我快疯了。我所有的排序规则都是 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'

我卡住了

最佳答案

I get Incorrect string value: '\x82' for column 'colum_name'

请解释。向我们展示查询。和SHOW CREATE TABLE

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

关于带有法语字符的mysql utf8问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32277759/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com