Java encode string to UCS -
i need encode utf-8 string ucs 'q' '\u0071' or '龥' '\u9fa5' in java. have tried code wrong result ...
new string(inputstring.getbytes("iso8859_1"), "utf-8");
if don't mind apache commons, try:
org.apache.commons.lang.stringescapeutils#escapejavastylestring
Comments
Post a Comment