0
如何檢查DB2中表或列的字符編碼?如何檢查DB2中表或列的字符編碼?
我在DB2數據庫的某些記錄中出現了奇怪的字符,我想知道如何檢查表或列的當前字符編碼集。
因爲它的,我收到一個錯誤。這是堆棧跟蹤。
Exception: [jcc][t4][1065][12306][3.64.106] Caught java.io.CharConversionException.
See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
01/14/2014 01:44:44 AM HTTP JVM: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.64.106] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.bd.a(bd.java:663)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.bd.a(bd.java:60)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.bd.a(bd.java:112)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.fc.a(fc.java:2825)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.fc.p(fc.java:525)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.fc.N(fc.java:1562)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.ResultSet.getStringX(ResultSet.java:1147)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.ResultSet.getString(ResultSet.java:1122)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.ResultSet.getString(ResultSet.java:1698)
01/14/2014 01:44:44 AM HTTP JVM: at PersonalInventionHistory.inventorDetail(Unknown Source)
01/14/2014 01:44:44 AM HTTP JVM: at PersonalInventionHistory.NotesMain(Unknown Source)
01/14/2014 01:44:44 AM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)
01/14/2014 01:44:44 AM HTTP JVM: at lotus.domino.NotesThread.run(Unknown Source)
01/14/2014 01:44:44 AM HTTP JVM: Caused by:
01/14/2014 01:44:44 AM HTTP JVM: java.nio.charset.MalformedInputException: Input length = 3793
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.r.a(r.java:19)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.fc.a(fc.java:2821)
01/14/2014 01:44:44 AM HTTP JVM: ... 9 more
01/14/2014 01:44:44 AM HTTP JVM: Caused by:
01/14/2014 01:44:44 AM HTTP JVM: sun.io.MalformedInputException
01/14/2014 01:44:44 AM HTTP JVM: at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:293)
01/14/2014 01:44:44 AM HTTP JVM: at com.ibm.db2.jcc.am.r.a(r.java:16)
01/14/2014 01:44:44 AM HTTP JVM: ... 10 more
這取決於DB2平臺和版本。您可能還需要詳細描述如何確定__strange characters__出現在數據庫中,而不是您使用的客戶端的假象。 – mustaccio
同意@mustaccio - 我已經研究過這種數據 - 從一個客戶端我有一個重音y,另一個重音我。這種行爲_may_在複製到記事本的結果中已經產生了一些影響(時間太長,無法準確記住)...因爲我一直在尋找「不尋常」的字符,所以我沒有打算弄清楚哪一個是正確的(通過檢查字節並檢查編碼表)。 –