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

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

python - Received unregistered task using Celery with Django -