You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Matt Nemenman <ma...@inktomi.com> on 2003/09/24 02:23:10 UTC

Possible bug: invalid byte 1 (...) of a 1-byte sequence.

Hi,

While trying to parse the file below (also in attachment), i got an
error at line 1, position 40: "An exception occurred!
Type:UTFDataFormatException, Message:invalid byte 1 () of a 1-byte
sequence."

<?xml version="1.0" encoding="utf-8" ?>
<tag>
Temperature 90F
</tag>


The file indeed contains an invalid UTF-8 character (a Latin1
character), however this character is at line 3, position 15 (completely
not where it is reported). I have seen this problem quite often: invalid
character error is often reported at the very end of xml declaration
(line 1), even if invalid character is thousand lines down the file. 

Am I missing something, or is it a bug?

Thanks a lot,

	-- Matt