Subject: ctype question on 1.2
To: None <current-users@NetBSD.ORG>
From: Guenther Grau <s_grau@ira.uka.de>
List: current-users
Date: 10/15/1996 00:06:06
Hi,

I am just fixing a program and to print out characters
I use isprint. I was getting unprintable characters in
the output and was wondering why this is the case.
After browsing through some src and include files I found
that the array _ctype_ is used to determine if a character
is printable or not.

_ctype_ defined in /usr/src/lib/libc/gen/ctype_.c is not completly
filled. It just fills in the stuff for characters 0 to 128.
What happens to the rest of the caracters? Is this the ANSI-C
definition? How can I change it?

I don't have my Ansi-C programming manual at hand, but I thought
that a system was supposed to deal with local character sets.
I did a man -k locale, then man nl_laninfo, but couldn't find
more information on this. The reference to setlocale(3) is a
nil-pointer, i.e. setlocale.3 is nonexistent.

Now I am at loss. IMHO it would be a good idea to fill the ctype
array for the iso-8895-1 character set as default and change it
if LC_CTYPE is defined differently in the environment.

Any comments? Maybe I should have waited till tomorrow, because
it's really getting late now ...

  Guenther