Java clob retrieval using getString - character encoding issue
So I have a database with a table, where one of it's entries is 'é€áí', and I know this is correct in the db. It is stored as a clob.
In Java, I retrieve the entry like so:
String text = resultSet.getString(DBConstants.COL_NOTE_TEXT);
When debuggin开发者_高级运维g, text is equal to 'é\u0080áí' and when displayed on the screen the euro symbol is a square block.
Anyone seen this before? Any suggestions?
Thanks in advance.
0080 is the euro character in the Windows Western encoding (cp-1252); in Unicode it is 20AC. You may want to check the encoding of the input. The other thing to check is that the screen is capable of displaying the euro symbol. If it will display '\u20AC' that part is answered.
See:
oracle-jdbc-euro-character
Think this is my problem. Thanks for the help though.
精彩评论