我有一个存储过程,它有一个字符串参数。当我使用包含一些特殊字符(如“ş”或“ğ”)的word调用时,它返回Error Code: 1366. Incorrect string value: '\xC5\x9Fe' for column 'personalNames' at row 1 . But when I call with without this special chars everything is ok.
下面是我的sp的一部分:
IF personalNames != '' THEN
SET personalNames = LOWER(personalNames);
SET @WherePart = CONCAT(@WherePart,' AND LOWER(per.Name) LIKE "%',personalNames,'%"');你有什么建议吗?
发布于 2014-09-03 19:55:45
我的错误出在参数上。我将参数更改为personalNames VARCHAR(200) character set utf8,问题就解决了。
发布于 2014-09-03 17:24:15
问题出在数据库的字符集。将其更改为UTF-8。如果您启动mysql-Server,这可以在命令行上完成。参数为:
--default-character-set=UTF8问候Marc
https://stackoverflow.com/questions/25640427
复制相似问题