Invalid byte 1 of 1-byte UTF-8 sequence
Change the encoding attribute value of the XML UTF-8 to UTF8
Org.xml.sax.SAXParseException:Content is isn't allowed in trailing
You can solve the problem by first parsing and string trim ().
If it's gb2312, we'll just have a simple piece.
XML content is actually encoded in UTF-8, so that the XML file including Chinese characters can not be read properly, the encoding format is changed to "GB2312" after the normal parsing. <?xml version= "1.0" encoding= "GB2312"?>
Modify encoding
First, you can change the UTF-8 to GBK or GB2312 directly in the XML file
The code is as follows |
Copy Code |
<?xml version= "1.0" encoding= "GB2312"?> |
Second, you can change in eclipse, in Eclipse's feature sheet [project]→[properties],?? [Resources], in the right "text file encoding", put the original Xing to the y?? ??, change? "utf-8".