作者:張小媫_602 | 来源:互联网 | 2023-05-17 10:18
IamworkingonaprojectwhereallthesourcefilesareencodedasUTF-8soastopleasethejavac
I am working on a project where all the source files are encoded as UTF-8 so as to please the java compiler (It will spit out errors on other encodings). Everytime i save a source file with Android Studio, it will write a Byte Order Mark on the file, preventing the compilation from succeeding. How can i fix this?
我正在开发一个项目,所有的源文件都被编码为UTF-8,以便让java编译器(它会在其他编码上输出错误)。每次我在Android Studio中保存一个源文件时,它都会在文件上写一个字节顺序标记,防止编译成功。我怎么解决这个问题?
As a workaround, i am manually deleting the BOM with a Hex Editor but it gets really annoying.
作为一个解决方案,我用一个Hex编辑器手动删除BOM,但它变得非常烦人。
3 个解决方案