Re: [xml] SAX API returns wrong length for characters containing non-ASCII

* Ludwig Weiß wrote:
I'm trying to parse a xml document with the SAX API. The document containts
some some german "umlaute". A short example:
<?xml version="1.0" encoding="UTF-8"?>
<X><n>hello from Köln</n><g></g></X>
<X><n>öhello from Köln</n><g></g></X>

The callback to my charactersSAXFunc tells me the String inside <n>...</n>
of the first line has a length of 12. So the String I save for later use is
just "hello from K".

SAX implementations are allowed to call the characters callback more
than once for a given text content. Does your code account for that?
Björn Höhrmann · mailto:bjoern hoehrmann de ·
Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]