首页 > 其他 > 详细

Invalid byte 3 of 3-byte UTF-8 sequence

时间:2014-05-26 21:31:02      阅读:612      评论:0      收藏:0      [点我收藏+]

遇到这类错误,一般都是编码问题导致,文件编码、保存时的编码都要保持一致,如果尝试了好多次并且确定所有编码均为UTF-8还报下面的错误,

建议将xml文件顶部的encoding="UTF-8"  改为  encoding="GBK"

详细错误:

严重: Servlet.service() for servlet ReportServlet threw exception
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:674)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:425)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(XMLEntityScanner.java:1619)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1657)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:193)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)

 

 

大概就这样。

这样的问题一般都是编码不一致所致。

Invalid byte 3 of 3-byte UTF-8 sequence,布布扣,bubuko.com

Invalid byte 3 of 3-byte UTF-8 sequence

原文:http://www.cnblogs.com/ssh2/p/3745848.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!