首页 > 其他 > 详细

Incorrect string value: 'è?·å??...' for column 'result' at row 1

时间:2019-10-20 18:17:33      阅读:102      评论:0      收藏:0      [点我收藏+]

错误详情信息:

### Error updating database.  Cause: java.sql.SQLException: Incorrect string value: \xE8\x8E\xB7\xE5\x8F\x96... for column result at row 1
### The error may involve com.blog.springboot.dao.ApiLogDao.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO wp_api_log   ( class_name,  method_name,  params,  `result`,  consume_time,  update_date )  VALUES   ( ?,  ?,  ?,  ?,  ?,  ? )
### Cause: java.sql.SQLException: Incorrect string value: \xE8\x8E\xB7\xE5\x8F\x96... for column result at row 1
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect string value: \xE8\x8E\xB7\xE5\x8F\x96... for column result at row 1; nested exception is java.sql.SQLException: Incorrect string value: \xE8\x8E\xB7\xE5\x8F\x96... for column result at row 1] with root cause

java.sql.SQLException: Incorrect string value: \xE8\x8E\xB7\xE5\x8F\x96... for column result at row 1

错误原因分析:
插入的数据列中,如果是中文的话,则会出现上面的错误,如果是英文的话,就不会出现错误。
故推测与字段列编码有关系,果然查看表对应的字符编码发现都是latin,最后将其改为utf8即可解决。

如果想永久解决这样的问题,可参考该链接:https://www.cnblogs.com/youcong/p/9374498.html
上面的问题我很久之前就遇到过,所以那个时候就已经记录了解决的办法。

Incorrect string value: 'è?·å??...' for column 'result' at row 1

原文:https://www.cnblogs.com/youcong/p/11707828.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!