unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Zefram <zefram@fysh.org>
To: 20823@debbugs.gnu.org
Subject: bug#20823: argv mangled by locale
Date: Sun, 14 Aug 2016 22:36:16 +0100	[thread overview]
Message-ID: <20160814213616.GA22491@fysh.org> (raw)
In-Reply-To: <87a8ibjeum.fsf@pobox.com>

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





      parent reply	other threads:[~2016-08-14 21:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16  4:33 bug#20823: argv mangled by locale Zefram
2016-03-04 23:24 ` Zefram
2016-06-24  6:11 ` Andy Wingo
2016-06-24  8:42   ` Zefram
2016-08-14 21:36   ` Zefram [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160814213616.GA22491@fysh.org \
    --to=zefram@fysh.org \
    --cc=20823@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).