How to fix Invalid byte 1 of 1-byte UTF-8 sequence

  1. Open the xml in notepad
  2. Make sure you dont have extra space at the beginning and end of the document.
  3. Select File -> Save As
  4. select save as type -> All files
  5. Enter file name as abcd.xml
  6. 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.