[unixODBC-support] Need help for DB2 codepage

Nick Gorham nick at lurcher.org
Tue Apr 28 08:22:19 BST 2015


On 28/04/15 08:12, akiraxt at 21cn.com wrote:
> Hello,
> 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 ?
> ------------------------------------------------------------------------
> Vincent Huang
HI, I dont think unixODBC is directly involved in this, I think you need 
to configure the code set in the driver/database

-- 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20150428/21696309/attachment.html>


More information about the unixODBC-support mailing list