Dear sir! How can i judge a string's encoding?
Dear sir! How can i judge a string's encoding?Now i receive a string !but i do not known what encoding this string is? I want a method to judge the encoding.Thank you!
[196 byte] By [
lee_jin] at [2007-9-26 7:09:38]

Strings in Java are by definition in Unicode. If you want to convert them to a specific encoding, you can do this:String yenSign = new String("\u00A5");byte[] yenByteArray = yenSign.getBytes("UTF8");Now yenByteArray is encoded into bytes using UTF-8.