Read XML file Error: Invalid byte 2 of 2-byte UTF-8 sequence.

Source: Internet
Author: User
After the program reads the XML file, the system reports "Invalid byte 2 of 2-byte UTF-8 sequence" error, how to resolve it? 1, the program parses the XML, appears invalid byte 2 of 2-byte UTF-8 sequence error 2, should be the encoding error, generally use Ue,editplus and other tools to open the file. After modifying the finished file, save it as UTF-8 format, or open the XML with UltraEdit, once the file-to-convert-->ascii to UTF-8, then save, you can. 3, it is also possible that the file is less than the header file definition <?xml version= "1.0" encoding= "UTF-8"?> and I use 3, the file is missing the header file, add the header file, there is no error.

Read XML file Error: Invalid byte 2 of 2-byte UTF-8 sequence.

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.