From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#20823: argv mangled by locale Date: Sun, 14 Aug 2016 22:36:16 +0100 Message-ID: <20160814213616.GA22491@fysh.org> References: <20150616043300.GB2718@fysh.org> <87a8ibjeum.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1471210640 18544 195.159.176.226 (14 Aug 2016 21:37:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 14 Aug 2016 21:37:20 +0000 (UTC) To: 20823@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Aug 14 23:37:16 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ35o-0004dA-8L for guile-bugs@m.gmane.org; Sun, 14 Aug 2016 23:37:16 +0200 Original-Received: from localhost ([::1]:33806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZ35l-0002Aj-1I for guile-bugs@m.gmane.org; Sun, 14 Aug 2016 17:37:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZ35e-0002AQ-Fz for bug-guile@gnu.org; Sun, 14 Aug 2016 17:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZ35a-0007O0-44 for bug-guile@gnu.org; Sun, 14 Aug 2016 17:37:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZ35a-0007Nw-0j for bug-guile@gnu.org; Sun, 14 Aug 2016 17:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bZ35Z-0003O6-Ok for bug-guile@gnu.org; Sun, 14 Aug 2016 17:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 14 Aug 2016 21:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20823 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 20823-submit@debbugs.gnu.org id=B20823.147121058112967 (code B ref 20823); Sun, 14 Aug 2016 21:37:01 +0000 Original-Received: (at 20823) by debbugs.gnu.org; 14 Aug 2016 21:36:21 +0000 Original-Received: from localhost ([127.0.0.1]:57636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ34v-0003N5-JI for submit@debbugs.gnu.org; Sun, 14 Aug 2016 17:36:21 -0400 Original-Received: from river.fysh.org ([87.98.248.19]:41886 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ34t-0003Mv-UV for 20823@debbugs.gnu.org; Sun, 14 Aug 2016 17:36:20 -0400 Original-Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1bZ34q-0006Mk-Jb; Sun, 14 Aug 2016 22:36:16 +0100 Content-Disposition: inline In-Reply-To: <87a8ibjeum.fsf@pobox.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8380 Archived-At: 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