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


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

From: Andy Wingo <wingo <at> pobox.com>
To: mhw <at> netris.org, ludo <at> gnu.org
Cc: 20823 <at> debbugs.gnu.org, Zefram <zefram <at> fysh.org>
Subject: Re: bug#20823: argv mangled by locale
Date: Fri, 24 Jun 2016 08:11:29 +0200
On Tue 16 Jun 2015 06:33, Zefram <zefram <at> fysh.org> writes:

> I don't see any Scheme interface that reliably retrieves the command
> line arguments without locale decoding.
[...]
> The actual data passed between processes is an octet string, and
> there really needs to be some reliable way to access that octet string.
> My comments about resolution in bug#20822 "environment mangled by locale"
> mostly apply here too, with a slight change: it seems necessary to store
> the original octet strings and decode at the time program-arguments is
> called.  With that change, the decoding can be responsive to setlocale
> (and in particular can reliably use ISO-8859-1 in the absence of
> setlocale).

Proposal: scm_i_set_boot_program_arguments just copies the bytes, and
scm_program_arguments decodes them.  I don't know whether to save the
locale that was current at program start and use that locale to decode
the arguments, or default the current locale, or what.  I also don't
know whether to supply an optional "encoding" argument, and use that
encoding to decode the command line arguments.  Thoughts, Mark and
Ludovic?

Andy




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.