Improper Unicode handling occurs in the `DEFINE UTF16 TO UTF16` conversion functions within `xmltok.c`, which can split valid surrogate pairs when output space is limited. In `XML UNICODE` builds parsing non-native byte order UTF-16 input, attackers can provide crafted documents that deliver lone high surrogates to character data and default handlers.