Here you can find the source of unescapeJava(String escaped)
public static String unescapeJava(String escaped)
//package com.java2s; //License from project: Apache License public class Main { public static String unescapeJava(String escaped) { if (escaped.indexOf("\\u") == -1) return escaped; String processed = ""; int position = escaped.indexOf("\\u"); while (position != -1) { if (position != 0) processed += escaped.substring(0, position); String token = escaped.substring(position + 2, position + 6); escaped = escaped.substring(position + 6); processed += (char) Integer.parseInt(token, 16); position = escaped.indexOf("\\u"); }//w w w. j a v a 2s . com processed += escaped; return processed; } }