Subject: lib/2702: isprint() ignores locale settings
To: None <gnats-bugs@NetBSD.ORG>
From: Peter Seebach <email@example.com>
Date: 08/17/1996 11:34:16
>Synopsis: isprint() ignores the current locale
>Responsible: lib-bug-people (Library Bug People)
>Arrival-Date: Sat Aug 17 12:50:01 1996
>Originator: Peter Seebach
Peter Seebach - firstname.lastname@example.org - Copyright 1996 Peter Seebach.
C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
Unsolicited email is not welcome, and will be billed for at consulting rates.
The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
System: NetBSD taniemarie 1.2_BETA NetBSD 1.2_BETA (SEEBS) #0: Fri Aug 16 17:16:09 CDT 1996 seebs@taniemarie:/usr/src/sys/arch/amiga/compile/SEEBS amiga
isprint() (and everything else in <ctype.h>) has a fixed table of
case. Unfortunately, this does not support ISO 8859-1 or other
likely character sets.
This means, for instance, that vi will believe that \xe2 is not a
printable character, even though it is in that character set.
This could, if fixed, also make stty lcase's behavior smarter.
I think the best thing to do would be to make _ctype_ be a pointer,
not an array, and point it at one of several built in arrays,
depending on the current locale. The default behavior would
presumably be the same.