Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您需要文本文件的字符集,$ 是基本的 ascii,所以它几乎总是会显示,€-Symbol 例如在 ISO-8859-15 或 UTF-8 中。但正如我所说,这主要取决于正确读取的文本文件,Java 内部使用 UTF-16 并已覆盖。在使用 UTF-8 输出时,您是安全的。