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" "??????")

Reply via email to