Radovan Garabik writes:
> 
> From my naive point of view, I would expect isprint()
> to return nonzero for utf-8 locale, since this would allow
> older non-multibyte aware programs using isprint() just to
> pass utf-8 characters to output, which at least has a chance
> of working, instead of not displaying them at all.

The purpose of calling isprint in such programs is to filter out
control characters, right? Now when you such an old program calls
isprint on the individual bytes that constitute a multibyte character,
is cannot know whether that character is a graphic character (like
U+20AC) or a control character (like U+200E). Blindly returning 1
would work in some cases but not in others.

Better is to port the application to use mbrtowc and iswprint.

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

Reply via email to