First of all, the data in this table can be Chinese/Japanese/English/Korean encoded.
So when I retrieve the data, I will need to invoke:
String localStr = new String(rs.getBytes(CONTENT_INDEX),"SJIS");
String utf8Str = new String (localStr.getBytes("SJIS"), "UTF8");
where rs is java.sql.ResultSet
Then I will need to store the utf8 String to a new database table.
Since the default encoding is "ISO8859_1" and that I have no idea whether the data is
Chinese/Japanese/English/Korean encoded, how can I make the proper conversion?
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|