Subject: lib/2702: isprint() ignores locale settings
To: None <gnats-bugs@NetBSD.ORG>
From: Peter Seebach <seebs@taniemarie.solon.com>
List: netbsd-bugs
Date: 08/17/1996 11:34:16
>Number:         2702
>Category:       lib
>Synopsis:       isprint() ignores the current locale
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 17 12:50:01 1996
>Last-Modified:
>Originator:     Peter Seebach
>Organization:
Peter Seebach - seebs@solon.com - 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
>Release:        1.2_BETA
>Environment:
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


>Description:
	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.

>How-To-Repeat:
	Read isctype.c
>Fix:
	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.
>Audit-Trail:
>Unformatted: