GNU bug report logs - #20823
argv mangled by locale

Previous Next

Package: guile;

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

Date: Tue, 16 Jun 2015 04:34:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Zefram <zefram <at> fysh.org>
To: 20823 <at> debbugs.gnu.org
Subject: bug#20823: argv mangled by locale
Date: Sun, 14 Aug 2016 22:36:16 +0100
Andy Wingo wrote:
>                                                        I also don't
>know whether to supply an optional "encoding" argument, and use that
>encoding to decode the command line arguments.

If you don't fancy the profusion of extra "encoding" parameters on
argv access (this ticket), environment access (bug#20822), and all
sorts of syscalls (bug#22913), you could bundle them all together in
a fluid.  This would be a bit like the %default-port-encoding fluid,
but setlocale should absolutely not modify it.  It should follow the
scheme that I laid out in bug#24186: its value can be either a string
naming an encoding, or #:locale-at-io meaning that whenever encoding
is required the currently selected locale is consulted.  There should
also be a fluid determining the conversion strategy, like the existing
%default-port-conversion-strategy.  These two fluids together would
control the encoding and decoding for all operations that currently
apply the locale encoding to arbitrary data.  (Decoding locale-supplied
messages is a different matter.)

-zefram




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

Previous Next


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