I admit I haven't checked the latest glibc from CVS, and I haven't
investigated any databases of bug reports, so I apologise if this is
already well known.
With glibc-2.2.3, mbrtowc(&wc, "", 0, &ps) seems to return 0 instead
of (size_t)(-2). I think this is a bug.
We noticed this because a program stopped working when we tried to use
glibc instead of libutf8_plug.
Edmund
#include <stdio.h>
#include <string.h>
#include <wchar.h>
int main()
{
mbstate_t ps;
wchar_t wc;
memset(&ps, 0, sizeof(ps));
printf("%d\n", mbrtowc(&wc, "", 0, &ps));
return 0;
}
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/