[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
command line argument locale for a guile script
From: |
cong gu |
Subject: |
command line argument locale for a guile script |
Date: |
Sun, 6 Nov 2011 18:19:40 -0600 |
When guile 2.0 is used to write scripts, one have to manually do a
setlocale at the beginning of the script to enable non-asciiI
character support (why not by default?).
My question is that the command line arguments seems to be parsed
before any code in the script is executed (including the setlocale).
Thus non-ascii arguments are not read correctly. Do I miss something
or can anybody tell me how to read arguments correctly?
My locale is en_US.UTF-8. Guile 1.8 works just fine.
$ cat test.scm
#!/usr/bin/guile
!#
(setlocale LC_ALL "")
(write (command-line))
$ ./test.scm 跪了
("./test.scm" "??????")
- command line argument locale for a guile script,
cong gu <=