GNU bug report logs - #24186
setlocale can't be localised

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Mon, 8 Aug 2016 16:33:01 UTC

Severity: normal

Full log


Message #23 received at 24186 <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: Ludovic Courtes <ludo <at> gnu.org>
Cc: Andy Wingo <wingo <at> pobox.com>, 24186 <at> debbugs.gnu.org
Subject: Re: bug#24186: setlocale can't be localised
Date: Tue, 11 Oct 2016 13:49:59 +0100
Ludovic Courtes wrote:
>That wouldn't help with the "setlocale" issue you describe per se, but
>this would address such use cases in a different way.
>
>WDYT?

Yes, explicit locale objects and locale parameters to relevant functions
are a good thing.  In general, the model of a global locale state is
broken, at least by threading, so some advance beyond the setlocale system
is necessary.  Note the new(er) "uselocale" system in libc, which gives
a per-thread locale state, fixing the biggest problem with setlocale.
Some form of that could also be mapped into Guile; it would be reasonable
to have a fluid that determines the locale to use where not overridden
by an explicit parameter.

All of that is welcome, but, as you say, doesn't deal with the actual
problem I identified with setlocale.  One can expect that setlocale will
continue to be used for the foreseeable future, and it needs to be shorn
of its unwanted side effects.

-zefram




This bug report was last modified 8 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.