Subject: Re: userlevel tools and setlocale(3)
To: None <tech-userlevel@NetBSD.org>
From: None <joerg@britannica.bec.de>
List: tech-userlevel
Date: 04/28/2006 17:23:38
On Fri, Apr 28, 2006 at 05:56:06PM +0300, Aleksey Cheusov wrote:
> > On Thu, Apr 27, 2006 at 09:53:56PM +0300, Aleksey Cheusov wrote:
>  >> What do you think about the following patch for nawk?
>  >> With this patch applied, awk will exit with error
>  >> if LANG or LC_ variable are set to incorrect value,
> 
> > Incorrect locale settings are softerrors, since it is entire
> > possible that a single part of a locale is not defined. setlocale()
> > is well-behaving in that regard, it falls back to "C", as if nothing
> > had happened.
> With this "softerror" scripts that rely on locale
> work _completely_ incorrect with no chance of signaling
> user about errors.

locale(1)?

Joerg