Tomohiro KUBOTA <[EMAIL PROTECTED]>:

> > It may detect the problem and return EINVAL.
> 
> The problem is, mbrtowc() returns size_t value.  Thus, any positive
> value cannot be used for error.
> 
> If this is a discussion to determine new standard, I would insist
> it should return some minus value, for example, -3.  Yes, errno
> should be set to EINVAL.

Don't worry: when I wrote "return EINVAL" this was just shorthand for
"return (size_t)(-1) and set errno to EINVAL".

By the way, UTF-8 is stateful as far as mbrtowc() is concerned, so
what Markus wrote about calling abort() does not constitute further
evidence of a UTF-8 conspiracy to reduce codeset-diversity.

Edmund
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to