How to fix Invalid byte 1 of 1-byte UTF-8 sequence
- Open the xml in notepad
- Make sure you dont have extra space at the beginning and end of the document.
- Select File -> Save As
- select save as type -> All files
- Enter file name as abcd.xml
- select Encoding - UTF-8 -> Click Save
How to fix this issue ?
Read the data using the correct character encoding. The error message means that you are trying to read the data as UTF-8 (either deliberately or because that is the default encoding for an XML file that does not specify <?xml version="1.0" encoding="somethingelse"?>
) but it is actually in a different encoding such as ISO-8859-1 or Windows-1252.
To be able to advise on how you should do this I'd have to see the code you're currently using to read the XML.