Invalid byte 1 of 1-byte UTF-8 sequence:
In My program, I was reading XML using InputStream and I was getting SAXException – Invalid byte 1 of 1-byte UTF-8 sequence, whenever I have junk character or non ASCII character in my XML. Later I found the solution by getting content in UTF-8 format. Below is the code change.
InputStream is= new FileInputStream("D:\\data\\response.xml");
Reader readerobj = new InputStreamReader(is,"UTF-8");
InputSource isr = new InputSource(readerobj);
isr.setEncoding("UTF-8");
saxParser.parse(isr);