Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I've trouble parsing tweets which are represented as escaped unicode some found to be foreign language strings e.g \u064a\u0633\u0639\u062f\u0646\u064a
\u064a\u0633\u0639\u062f\u0646\u064a
Using org.apache.commons.lang.StringEscapeUtils.
org.apache.commons.lang.StringEscapeUtils
String s="\\u0048\\u0065\\u006C\\u006C\\u006F"; System.out.println(StringEscapeUtils.unescapeJava(s));
P.S. Oops, I didn't refresh this page before I post the answer, the comments above conveys the same thing.
Add a comment
you can try str = org.apache.commons.lang.StringEscapeUtils.unescapeJava(str);
str = org.apache.commons.lang.StringEscapeUtils.unescapeJava(str);
from apache commons
check http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/StringEscapeUtils.html
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.