On Mon, Nov 7, 2011 at 6:59 AM, David Pirotte <david@altosw.be> wrote:Thanks for responding.
> You must also set port encoding, see manual section 6.14.1 for details:
>
> (set-port-encoding! (current-output-port) "utf-8")
>
But after a setlocale, utf-8 output is already fine. The problem is
argument parsing still not work for non-ascii characters.
(set-port-encoding! (current-input-port) "utf-8")
#!/usr/bin/guile
!#
(setlocale LC_ALL "")
(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?