IntelliJ: Java:syntax error on token ' Invalid Character ', delete this token
IntelliJ: "Illegal character: \65279" error message in idea
Importing items from MyEclipse to IntelliJ idea when coding error
The method provided in this article was successful in IntelliJ idea 10, but the use of IntelliJ 12 was unsuccessful, and it was necessary to use the more troublesome method of two in the IntelliJ, 12.
First, the problem description:
The project code created in Eclipse is imported into the IntelliJ idea after the discovery of Chinese garbled, using the tool to convert the source file encoding "UTF-8", the display is normal, but after modifying the file, the compilation appears "illegal characters: \65279".
Second, the cause of production:
IntelliJ idea for the file set to "UTF-8" encoded in the modified save automatically added the UTF-8 file signature, that is, the BOM (the file is viewed in 16 binary form, visible file header is "EF BB BF").
Third, the solution:
(1) compiled with the Eclipse compiler, the method set in IntelliJ idea 10.0 is settings (ctrl+alt+s)->project Setting->compiler->java Complier->use complier Select Eclipse, click OK
(2) Use notepad++ to remove BOM "IntelliJ idea 12 use, can be successful"
Specific method: First set to UTF-8 no ROM encoding, and then open the file, save this file, overwrite the original file.
Setup method: Format-UTF-8 encoding without ROM.
You are using IntelliJ idea 12 o'clock, you can first try the first method, if it is unsuccessful, then use the second one.
IntelliJ IDEA 12 encoded non-mapped characters