tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: using the interfaces in ctype.h

On Mon, Apr 21, 2008 at 02:43:20PM -0400, Greg A. Woods; Planix, Inc. wrote:
> On 21-Apr-08, at 1:57 PM, Joerg Sonnenberger wrote:
>> On Mon, Apr 21, 2008 at 01:52:41PM -0400, Greg A. Woods; Planix, Inc. 
>> wrote:
>>> Actually, no, it doesn't, at least on NetBSD.   Try it!  :-)
>> Sure. See attached code.
> You must have some different release of NetBSD than any I have.  I get "0 
> 0" from your program on stock 4.0, a netbsd-4 branch ("4.0_STABLE") system, 
> and of course on 1.6.2 too.  Same on Mac OS X 10.5.2 as well.

Grmbl. So I picked one of the few locales that were added after NetBSD
4. Other sample.

#include <ctype.h>
#include <locale.h>
#include <stdio.h>

        setlocale(LC_ALL, "bg_BG.CP1251");
        printf("%d %d\n", islower(-1), islower(255));
        return 0;

Home | Main Index | Thread Index | Old Index