unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <chris@cvine.freeserve.co.uk>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-user@gnu.org
Subject: Re: Filename encoding
Date: Wed, 15 Jan 2014 22:32:30 +0000	[thread overview]
Message-ID: <20140115223230.604b6a59@bother.homenet> (raw)
In-Reply-To: <87iotksyri.fsf@netris.org>

On Wed, 15 Jan 2014 16:47:45 -0500
Mark H Weaver <mhw@netris.org> wrote:
[snip]
> > So far as filenames are concerned, this seems to me to be something
> > for which a fluid would be just the thing - it could default to the
> > locale encoding but a user could set it to something else.
> 
> We could do that, but I'm not really sure how it would improve the
> situation.  If Guile expects the program to know the encoding of
> filenames on the filesystem, that just passes the buck to the program.
> How does the program know what encoding to use?
> 
> Yes, the program can know the encoding if it's a custom program
> written for one specific system.  However, if you write a program
> that's supposed to work on any system, how do you know the encoding?
> 
> It seems to me that each system must standardize on a single encoding
> for all filenames on that system, and the locale encoding is the
> defacto standard way of telling programs what that is.

A language support library such as guile can adopt a default but it
cannot standardize on anything.  It certainly cannot assume that all
filenames use the locale encoding which happens to be the chosen locale
on a particular user's computer.  The only thing a general library can
do is pass the issue back to the program.  Generally it would have to
be a setting for the program/network, along with many other
configuration settings.  A given computer system has to know other
basic things, like the address of its nameserver.  There are many
different ways in which that can be achieved.

In practice you might include it in a look-up table which the network
administrator provides.  More likely it is a standard promulgated by
the administrator for all systems which happen to form part of a single
business unit.  More likely still in other than Asia the administrator
has a policy of only using ASCII names for files served across wide
area networks.

Leaving that aside, the idea that a library should not enable the
program to choose its filename encoding as a configuration option in
some way seems to me to be odd, and unworkable in many real life
situations.

Chris



  reply	other threads:[~2014-01-15 22:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 12:52 Filename encoding Chris Vine
2014-01-15 18:14 ` Mark H Weaver
2014-01-15 19:02   ` Eli Zaretskii
2014-01-15 21:34     ` Mark H Weaver
2014-01-16  3:46       ` Eli Zaretskii
2014-01-15 19:50   ` Chris Vine
2014-01-15 21:00     ` Eli Zaretskii
2014-01-15 21:42       ` Chris Vine
2014-01-16  3:52         ` Eli Zaretskii
2014-01-15 21:47     ` Mark H Weaver
2014-01-15 22:32       ` Chris Vine [this message]
2014-01-16  3:55       ` Eli Zaretskii
2014-01-15 23:29     ` Ludovic Courtès
2014-01-16  4:00       ` Eli Zaretskii
2014-01-16 13:03         ` Ludovic Courtès
2014-01-16 14:07           ` John Darrington
2014-01-16 16:12             ` Eli Zaretskii
2014-01-16 16:09           ` Eli Zaretskii
2014-01-16 15:36         ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140115223230.604b6a59@bother.homenet \
    --to=chris@cvine.freeserve.co.uk \
    --cc=guile-user@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).