guile-user
[Top][All Lists]
Advanced

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

Re: Filename encoding


From: Eli Zaretskii
Subject: Re: Filename encoding
Date: Wed, 15 Jan 2014 23:00:18 +0200

> Date: Wed, 15 Jan 2014 19:50:51 +0000
> From: Chris Vine <address@hidden>
> Cc: address@hidden
> 
> POSIX system calls are encoding agnostic.  The filename is just a series
> of bytes terminating with a NUL character.  All guile needs to know is
> what encoding the person creating the filesystem has adopted in naming
> files and which it needs to map to.

This doesn't work well, because you cannot easily take apart and
construct file names in encoding-agnostic ways.  For example, some
multibyte sequence in an arbitrary encoding could include the '/' or
'\' characters, so searching for directory separators could fail,
unless you use multibyte-aware string functions (which is a nuisance,
because these functions only support a single locale at a time).

So I think using UTF-8 internally is a much better way.



reply via email to

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