Consider the following Java code:
String str = "\u8ba9\u4ed6\u51fa\u6d77\u4e86";
// ...
System.out.print(str);
I want to get the characters from str. Thank you in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look in this issue in Commons-IO JIRA. Hopefully the class
UnicodeUnescapeReaderwill be integrated incommons-ioin the future. Nevertheless you can integrate it in your codebase and easily use it:This outputs is this:
让他出海了Alternative with commons-io: