error: illegal character: '\ufeff' in java

前端 未结 3 1997
自闭症患者
自闭症患者 2021-01-02 08:09

Got this error when compiled java code in ubuntu.

![Got this error][1]

error: illegal character: \'\\ufeff\'
<
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-02 08:38

    In case your are working on Windows O.S. and use Eclipse (which don't have the functionality to remove the BOM from the file), just open the file in Notepad++ and in the encoding menu, select "UTF-8", then save the file.

提交回复
热议问题