[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20823: argv mangled by locale

From: Andy Wingo
Subject: bug#20823: argv mangled by locale
Date: Fri, 24 Jun 2016 08:11:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Tue 16 Jun 2015 06:33, Zefram <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]