Date: Mon, 14 Jul 1997 15:28:34 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: r.carey@dcs.napier.ac.uk (Robin Carey) Cc: hoek@hwcn.org (Tim Vanderhoek), freebsd-bugs@FreeBSD.ORG Subject: Re: ispunct(3) [was: FreeBSD-2.1.1] Message-ID: <19970714152834.RR49021@uriah.heep.sax.de> In-Reply-To: <Pine.SOL.3.91.970714135123.19515B-100000@artemis>; from Robin Carey on Jul 14, 1997 14:03:44 %2B0100 References: <19970713193138.DB37367@uriah.heep.sax.de> <Pine.SOL.3.91.970714135123.19515B-100000@artemis>
next in thread | previous in thread | raw e-mail | index | archive | help
As Robin Carey wrote: > And my results were different; ispunct(3) was returning TRUE for chars > above 127 ..... Right. As the standard says: printing character, except letter or digit or space. > Oh ... the manual page doesn't mention anything about characters other > than ASCII. Doesn't that mean ispunct(3) is not "ANSI C" standard then ? AFAIK, ANSI C doesn't mention anything beyond ASCII, so the behaviour is simply undefined. Extending the default behaviour to ISO Latin-1 seems to be a reasonable interpretation of `undefined'. If you restrict the domain of the isfoo() functions to ASCII, you are not bitten by this. If you don't, you have another problem anyway (since you're relying on undefined behaviour). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970714152834.RR49021>