[unixODBC-support] Need help for DB2 codepage
akiraxt at 21cn.com
Wed Apr 29 04:56:04 BST 2015
We are using ODBC/DB2 CLI method to access DB2 LUW. The codeset of DB2 database server is GBK, which is a double bytes charactorset and our application is using UTF-8. When we insert a Chinese string into DB2 table, we may encount error "[IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001 ".
A single Chinese charactor occupies two bytes in GBK codeset, and three bytes in UTF-8 codeset. I think this may be the root cause of data length may overflow during inserting.
My question is if there is any configuration parameter or key word in UnixODBC to ensure the CCSID conversion for DB2 environment ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the unixODBC-support