Re: XML_CharacterDataHandler: can it receive text cut half inside a multibyte character sequence?
Karl Waclawek <[email protected]> Sat, 14 Mar 2009 17:05:13 -0400
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
Boris DuĊĦek wrote: > When expat calls the function set by XML_SetCharacterDataHandler, can > the function receive a block of text (with parameters const XML_Char > *s, int len) such that it ends in the middle of a multibyte character? > (i.e. there is a unicode character encoded as a sequence of 2-4 bytes, > and the block's last character, s[len-1], is a character of a > multibyte sequence that is not a last character of such multibyte > sequence). <snip> > but it would be great if expat did not end in the middle of a > multibyte sequence. > Expat should not return partial characters, though it can handle partial characters on input (unless it is the last input buffer, of course). Btw, there is also the UTF-16 version of Expat - libexpatw, returning UTF-16 encoded content. Karl _______________________________________________ Expat-discuss mailing list [email protected] http://mail.libexpat.org/mailman/listinfo/expat-discuss