08-01
22
Illegal mix of collations (utf8_bin,IMPLICIT) and (latin1_swedish_ci,COERCIBLE)
作者:Java伴侣 日期:2008-01-22
错误如下:
编码问题,一个表是latin1字符集的,而传进的参数是UTF-8的,所以需要统一字符集,指令如下:
引用内容
General error, message from server: "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'"
编码问题,一个表是latin1字符集的,而传进的参数是UTF-8的,所以需要统一字符集,指令如下:
复制内容到剪贴板 程序代码
mysql> Alter TABLE suggest CONVERT TO CHARACTER SET utf8;
Query OK, 98 rows affected (0.05 sec)
Records: 98 Duplicates: 0 Warnings: 0
Query OK, 98 rows affected (0.05 sec)
Records: 98 Duplicates: 0 Warnings: 0
08-01
22
Character decoding failed. Parameter skipped.java.io.CharConversionException: isHexDigit.
作者:Java伴侣 日期:2008-01-22
做ajax传递参数的时候遇到这个异常,在网上找了N天的东西,还是没找到答案,原来我一直没发现原来是 escape带来的错误。我是这样写的
var url = "b.jsp?name=" + escape(u_name);
服务端获取:
String name=request.getParameter("name");
name=new String(name.getBytes("iso-8859-1"));
System.out.println(name);
结果老是报错:org.apache.tomcat.util.http.Parameters processParameters
var url = "b.jsp?name=" + escape(u_name);
服务端获取:
String name=request.getParameter("name");
name=new String(name.getBytes("iso-8859-1"));
System.out.println(name);
结果老是报错:org.apache.tomcat.util.http.Parameters processParameters
Tags: isHexDigit AJAX escape