ML 3 bytes of UTF-8 sequence byte 3 is invalid

Source: Internet
Author: User

When writing a **.xml file in eclipse today, the Chinese in the note was identified by eclipse as an error: Byte 3 of the 3-byte UTF-8 sequence is invalid and has encountered this problem many times, the root cause of the problem is:

The cause of this is a file which is not UTF-8 is being parsed as UTF-8. It is likely, the parser is encountering a, a byte value in the range fe-ff. These values is invalid in the UTF-8 encoding.

But this is very strange, I use notepad++ to save Pom.xml code as "UTF-8 no BOM" form, pom.xml file encoding attribute set to "UTF-8", the problem is still ah, depressed, is the above theory has problems. or the eclipse bug. Read on the internet for a long while, basically say so.

First, you can change UTF-8 to GBK or GB2312 directly in the XML file

<properties>
 <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
</ Properties>

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.