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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -