开发者

Java clob retrieval using getString - character encoding issue

开发者 https://www.devze.com 2022-12-12 19:41 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号