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

后端 未结 13 1378
我寻月下人不归
我寻月下人不归 2020-11-28 13:54

I am trying to fetch the below xml from db using a java method but I am getting an error

Code used to parse the xml

DocumentBuilderFactory dbf = Docu         


        
13条回答
  •  青春惊慌失措
    2020-11-28 14:50

    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 ) 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.

提交回复
热议问题