时间:2021-07-01 10:21:17 帮助过:9人阅读
During insert from the CLP there is no codepage conversion if operating system codepage and database codepage are both UTF-8. In this case data to be inserted should also be in UTF-8 encoding.
If data has a different encoding then the database codepage (this can be verified using any hex editor), then the operating system codepage should be changed to match the data‘s encoding in order to enforce the data conversion to the database codepage.
Error executing Select SQL statement. Caught by java.io.CharConversionException. ERRORCODE=-4220
Caused by: java.nio.charset.MalformedInputException: Input length = 4759 at com.ibm.db2.jcc.b.u.a(u.java:19) at com.ibm.db2.jcc.b.bc.a(bc.java:1762)
During an insert of data using CLP characters, they do not go through codepage conversion. If operating system and database codepage both are UTF-8, but the data to be inserted is not Unicode, then data in the database might have incorrect codepoints (not-Unicode) and the above error will be a result during data retrieval.
To verify the encoding for data to be inserted you can use any editor that shows hex representation of characters. Please verify the codepoints for non-ASCII characters that you try to insert. If you see only 1 byte per non-ASCII characters then you need to force the database conversion during insert from CLP to UTF-8 database.
To force codepage conversion during insert from the CLP make sure that the operating system codepage is non-Unicode and matching to the codepage of data when you insert data to Unicode database from non-Unicode data source.
Problem Details An example problem scenario is as follows:
UNIX, Linux, Unicode database
Verify that non-ASCII data have a proper Unicode codepoints in Unicode database
Reinsert data with codepage conversion enforced by setting the operation system codepage matching to the codepage of data to be inserted
Export data:
By adding a comment, you accept our Terms of Use. Your comments entered on this IBM Support site do not represent the views or opinions of IBM. IBM, in its sole discretion, reserves the right to remove any comments from this site. IBM is not responsible for, and does not validate or confirm, the correctness or accuracy of any comments you post. IBM does not endorse any of your comments. All IBM comments are provided "AS IS" and are not warranted by IBM in any way.
Wrong codepoints for non-ASCII characters inserted in UTF-8 database using CLP
标签:poi rar sed article ascii rmi chart elf result