title: How to check the character encoding of a table or column in DB2?
body: <p>How to check the character encoding of a table or column in DB2?</p>
  
  <p>I have strange characters appearing in certain records in a DB2 database and I was wondering how I could check for the current character encoding set for the table or column.</p>
  
  <p><img src="https://i.stack.imgur.com/18HEC.png" alt="Strange characters"></p>
  
  <p>Because of it, I'm receiving an error. Here's the stack trace. </p>
  
  <pre><code>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
  </code></pre>