使用Apache Commons Lang。
import org.apache.commons.lang3.StringEscapeUtils;// open the file as ASCII, read it into a string, thenString escapedStr; // = "u0905u092du0940 u0938u092eu092f u0939u0948 ..."// (to include such a string in a Java program you would have to double each )String hindiStr = StringEscapeUtils.unescapeJava( escapedStr );System.out.println(hindiStr);
(确保您的控制台设置为显示北印度语(正确的字体等),并且控制台的编码与您的Java编码相匹配。上面的Java代码仅是基本内容。)



