Menu

#6 Error parsing UTF8

open
nobody
None
5
2005-11-14
2005-11-14
PerErikA
No

When an UTF8 character is found last in the
rawReadBuffer the method getNextUtf8Byte read the
next character direct from the stream. The problem is
that it reads an integer (4 bytes) instead of one byte,
and then discards the extra 3 bytes.

The fix is to make a new variable in
TXMLParser.getNextUtf8Byte (i.e. bVal: Byte) and
change the stream reading to
c:= stream.read(bVal, sizeOf(bVal));
val := bVal;

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.