Friday, 23 August 2013

Java encode string to UCS

Java encode string to UCS

I need to encode UTF-8 string to UCS like 'q' to '\u0071' or 'ý›' to
'\u9FA5' in Java. I have tried this code but with wrong result ...
new String(inputString.getBytes("ISO8859_1"), "UTF-8");

No comments:

Post a Comment