É与 MySQL 数据库中的 E 比较
MySQL 认为 É 和 E 相同,因此抛出异常:Duplicate entry 'CLEME' for key 'PRIMARY'
MySQL 是 5.1.30,表使用 utf8-unicode-ci 并且定义了字段如下:
search_key
varchar(120) CHARACTER SET latin1 NOT NULL,
有没有办法让这个字段知道它们不一样?
谢谢!
MySQL thinks É and E are the same and thus throw an exception saying Duplicate entry 'CLEME' for key 'PRIMARY'
MySQL is 5.1.30 and the table uses utf8-unicode-ci and the field is defined as follows:
search_key
varchar(120) CHARACTER SET latin1 NOT NULL,
Is there a way to let this field know they are not the same?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将字段的字符集也更改为 UTF-8。另外,在执行插入时将连接字符集设置为 UTF-8。
Change the character set of the field to UTF-8 as well. Also, set the connection character set to UTF-8 when you do the insert.