ansic_quote calls mbrtowc with a NULL parser state argument. This uses a
static anonymous shift state that ends up in an undefined state after an
invalid sequence. AFAICT most libcs handle UTF-8 conversions with the
static state just fine, but on Android [1] the bionic libc implementation
will, in fact, produce incorrect results if the state is reused after an
invalid sequence:
Thanks for the report. I suppose the state is technically undefined after
an invalid wide character.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/