GNU bug report logs -
#20823
argv mangled by locale
Previous Next
Full log
View this message in rfc822 format
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.