当前位置: 代码迷 >> 综合 >> 解决报错Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
  详细解决方案

解决报错Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)

热度:45   发布时间:2024-01-15 12:50:25.0

解决报错Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’

  • 编码问题
  • 将要接收的字符转为 utf-8
  • 例如
  • String name = new String(request.getParameter("uname").getBytes("ISO-8859-1"),"UTF-8");
  相关解决方案