invalid byte 2 of 2-byte UTF-8 sequence

前端 未结 7 1913
萌比男神i
萌比男神i 2020-12-14 16:18

I am trying to parse an XML file with but ran into an error message invalid byte 2 of 2-byte UTF-8 sequence

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 17:02

    I had the same problem too when trying import my .xml file into my java tool. And I found a good solution for this: 1. Open the .xml file with Notepad++ then save the .xml file as .rtf file. Then open this file in WordPad application. 2. Save the .rtf file as .txt file, then open it with Notepad, and save it as .xml file again. When saving in Notepad, near the end of the pop-up window, make sure choosing the option "Encoding: UTF-8". It worked for mine, hope it's useful for yours too.

提交回复
热议问题