IntelliJ IDEA 12 encoded non-mapped characters

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.