unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: cong gu <gucong43216@gmail.com>, guile-user@gnu.org
Subject: Re: command line argument locale for a guile script
Date: Tue, 8 Nov 2011 03:16:54 +0800	[thread overview]
Message-ID: <CAPjoZodiSZwmB+V5LdDLaTUyfZSAWwN8_ffQJi+BZoW-f-GWDQ@mail.gmail.com> (raw)
In-Reply-To: <CAH_4JjO_CCF=8pLuRM1kmD+sMg8+yOdqgM4Ob3vydqLXcp_EWQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Mon, Nov 7, 2011 at 11:31 PM, cong gu <gucong43216@gmail.com> wrote:

> On Mon, Nov 7, 2011 at 6:59 AM, David Pirotte <david@altosw.be> wrote:
> > You must also set port encoding, see manual section 6.14.1 for details:
> >
> >        (set-port-encoding! (current-output-port) "utf-8")
> >
>
> Thanks for responding.
>
> But after a setlocale, utf-8 output is already fine.  The problem is
> argument parsing still not work for non-ascii characters.
>
> #!/usr/bin/guile
> !#
> (setlocale LC_ALL "")
> (set-port-encoding! (current-input-port) "utf-8")
> (set-port-encoding! (current-output-port) "utf-8")
> (write "跪了") ;; fine
> (write (command-line)) ;; not work
>
>
> After I add a setlocale to boot-9.scm, all things works.  But is there
> a "normal" way to fix this?
>
>
hi, we've talked about this problem and we think it's a real bug.
I sent a patch just now, it is solved. You may see it work soon.

[-- Attachment #2: Type: text/html, Size: 1438 bytes --]

  reply	other threads:[~2011-11-07 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07  0:19 command line argument locale for a guile script cong gu
2011-11-07 12:59 ` David Pirotte
2011-11-07 15:31   ` cong gu
2011-11-07 19:16     ` Nala Ginrut [this message]
2011-11-07 19:16     ` Thien-Thi Nguyen
     [not found]       ` <CAPjoZodm7Zuekimv7h8DwfkzbTEQVapj6U_qRLYokRb2xsD+Zw@mail.gmail.com>
2011-11-07 19:24         ` Nala Ginrut
2012-01-09 22:15 ` Andy Wingo

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=CAPjoZodiSZwmB+V5LdDLaTUyfZSAWwN8_ffQJi+BZoW-f-GWDQ@mail.gmail.com \
    --to=nalaginrut@gmail.com \
    --cc=gucong43216@gmail.com \
    --cc=guile-user@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).