Marco Cimarosti writes:
> Anyone knows any reliable on-line reference for these functions?
Yes. 1) the Linux manual pages.
2) The SUSV2. Their wording is nearly identical to the one in ISO C 99.
http://www.opengroup.org/onlinepubs/007908799/xsh/mbrtowc.html
3) The glibc documentation.
> So far, I have been using <http://www.dinkumware.com/htm_cl/wchar.html>,
It is out of date. It is based on the ANSI C amendment 1 (ca. 1995).
The semantics of mbrtowc has been changed since then.
> 2) In <http://www.dinkumware.com/htm_cl/wchar.html#mbstate_t> it says that
> mbstate_t can be initialized simply by setting its *first* member of to
> zero ("mbstate_t mbst = {0};")
Wrong advice. On some platforms mbstate_t is a scalar, which you can't
initialize like this.
Bruno
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/