From owner-freebsd-stable Mon Jan 10 22: 6:40 2000 Delivered-To: freebsd-stable@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id 4452A15418; Mon, 10 Jan 2000 22:06:10 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id MAA92931; Tue, 11 Jan 2000 12:03:15 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Date: Tue, 11 Jan 2000 12:03:14 +0600 (NS) From: Max Khon To: Mikhail Teterin Cc: obrien@FreeBSD.ORG, ache@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: isprint(3) and LANG/LOCALE In-Reply-To: <200001110507.AAA90968@rtfm.newton> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Tue, 11 Jan 2000, Mikhail Teterin wrote: > =>Is the subject supposed to consider the LANG setting? I'd think so, > =>but > => > =I would email ache@freebsd.org as he is our internationalization guy. > > Is not he reading -stable? > > =Possibly putting calls to setlocale() in main() will help. > > Does not appear to change the result of this little program... > > -mi > > #include > #include > > #include > > main(int argc, char *argv[]) { > char *c; > setlocale(LC_ALL, ""); > for(c = argv[argc-1]; *c; *c++) > printf("for %c isprint() returns %d\n", *c, isprint(*c)); > } char is signed. you should use 'unsigned char *c' for isprint to work with chars > 127 this happens because _BSD_CT_RUNE_T_ is #define'ed as 'int' (is signed) in machine/ansi.h possibly this should be changed to int. ask ache about it. /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message