JDBC 连接informix 中文字符集转换失败
0
JDBC 连接informix ,informix 数据库字符集设置为big5. 客户端语言环境为UTF-8,数据库字段存在“墙”,“銹”字符时,
获取数据失败
url详细:
url=jdbc:informix-sqli://192.168.0.1:8015/dsx:INFORMIXSERVER=on_tcp8;NEWLOACLE=en_us,zh_cn,zh_tw;
NEWCODESET=utf8,big5,57352;DB_LOCALE=zh_TW.57352;CLIENT_LOCALE=zh_TW.57352
错误信息:
获取数据失败
url详细:
url=jdbc:informix-sqli://192.168.0.1:8015/dsx:INFORMIXSERVER=on_tcp8;NEWLOACLE=en_us,zh_cn,zh_tw;
NEWCODESET=utf8,big5,57352;DB_LOCALE=zh_TW.57352;CLIENT_LOCALE=zh_TW.57352
错误信息:
Caused by: java.sql.SQLException: 不支援編碼或內碼集.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)
at com.informix.jdbc.IfxChar.fromIfx(IfxChar.java:235)
at com.informix.jdbc.IfxRowColumn.a(IfxRowColumn.java:380)
at com.informix.jdbc.IfxRowColumn.a(IfxRowColumn.java:282)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:4775)
at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:669)
at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:641)
at com.informix.jdbc.IfxResultSet.getObject(IfxResultSet.java:1511)
at com.informix.jdbc.IfxResultSet.getObject(IfxResultSet.java:809)