guile-user
[Top][All Lists]
Advanced

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

Re: Running script from directory with UTF-8 characters


From: Eli Zaretskii
Subject: Re: Running script from directory with UTF-8 characters
Date: Tue, 22 Dec 2015 22:59:05 +0200

> From: Marko Rauhamaa <address@hidden>
> Date: Tue, 22 Dec 2015 22:36:07 +0200
> Cc: address@hidden
> 
> By setting the character set artificially to Latin-1 in Guile, all
> pathnames are accessible to it.

No, they aren't, not as file names.  E.g., you cannot meaningfully
downcase or upcase such "characters", you cannot count characters (as
opposed to bytes), you cannot calculate how much screen estate will be
needed to display them, with some Far Eastern encodings you cannot
correctly search them for some specific ASCII characters (because they
can be part of a multibyte sequence), etc. etc.  IOW, you cannot work
with file names as human-readable text, which is something many
programs need to do.

File names _are_ strings, there's no way around that.  They are
strings because _people_ name files and give them meaningful names and
extensions.  If Guile cannot easily work with file names encoded in a
codeset other than the current locale's one, then Guile should be
extended to allow a program to tell it in which encoding to interpret
a particular name.  (I think Guile already supports that, but maybe I
misremember.)  But lobbying for treating file names as byte streams,
let alone Latin-1 characters, is a large step backwards, to 1990s when
we didn't know better.  We've come a long way since then and learned a
lot on the way.



reply via email to

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