> Date: Wed, 15 Jan 2014 19:50:51 +0000 > From: Chris Vine <ch...@cvine.freeserve.co.uk> > Cc: guile-user@gnu.org > > 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.