java 将 \u05DC 读写为 '?'

java reads and writes \u05DC as '?'

Java 正在将 \u05DC 或 (char)1500 写为 '?'这是 (char)63 或 \u003F,也从文件中读取它。

\u05DC是什么字,为什么java不写进去?

这是伪代码。

public void write() {
    char variable=(char)//some algorithm to figure out the integer, which ends up as 1500...
    file.write(char);
}

\u05DC 是希伯来字母 Lamed (ל)。

您需要使用ISO-8859-8编码写入文件

试试

PrintWriter pw = new PrintWriter("pathToYourFile", "ISO-8859-1");