blob field US-ASCII, convert UTF-8
Posted by: Dudi D
Date: August 12, 2010 08:12AM

The problem is that I have a blob field with encoders which is probably US-ASCII and I want to convert to UTF-8 or ISO-88-59, but is not correct with the way I'm doing.
Example:

while (rs.next()) {
obs = rs.getString("obs");
}

String unicode = new String(obs.getBytes(), "US-ASCII");
byte[] dataOut = unicode.getBytes("UTF-8");

Thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
blob field US-ASCII, convert UTF-8
3876
August 12, 2010 08:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.