相关疑难解决方法(0)

使用java读取unicode文本文件

真的很简单的问题.我需要在Java程序中读取Unicode文本文件.

我习惯使用普通的ASCII文本与BufferedReader FileReader组合,这显然不起作用:(

我知道我可以使用Buffered Reader以"传统"方式读取字符串,然后使用以下内容进行转换:

temp = new String(temp.getBytes(), "UTF-16");
Run Code Online (Sandbox Code Playgroud)

但有没有办法将Reader包装在'转换器'中?

编辑:文件以FF FE开头

java string unicode ascii

12
推荐指数
3
解决办法
5万
查看次数

标签 统计

ascii ×1

java ×1

string ×1

unicode ×1