[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile can't find a chinese named file

From: Marko Rauhamaa
Subject: Re: guile can't find a chinese named file
Date: Mon, 30 Jan 2017 17:54:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

address@hidden (Ludovic Courtès):

> In C, argv is just an array of byte sequences, but in Guile,
> (command-line) returns a list of strings, not a list of bytevectors.
> Guile decodes its arguments according to the encoding of the current
> locale. So if you’re in a UTF-8 locale (say, zn_CH.utf8 or
> en_US.utf8), Guile assumes its command-line arguments are
> UTF-8-encoded and decodes them accordingly.
> In the example above, it seems that the file name encoding was
> different from the locale encoding, leading to this error.

I'm afraid that choice (which Python made, as well) was a bad one
because Linux doesn't guarantee UTF-8 purity.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]