From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: Filename encoding Date: Wed, 15 Jan 2014 22:32:30 +0000 Message-ID: <20140115223230.604b6a59@bother.homenet> References: <20140115125246.53fc72c7@bother.homenet> <87bnzdun74.fsf@netris.org> <20140115195051.3272023c@bother.homenet> <87iotksyri.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389825164 22645 80.91.229.3 (15 Jan 2014 22:32:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 22:32:44 +0000 (UTC) Cc: guile-user@gnu.org To: Mark H Weaver Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jan 15 23:32:48 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W3Z0v-0003Ha-Aa for guile-user@m.gmane.org; Wed, 15 Jan 2014 23:32:45 +0100 Original-Received: from localhost ([::1]:57577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Z0u-0005De-Sp for guile-user@m.gmane.org; Wed, 15 Jan 2014 17:32:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Z0g-0005DY-Kw for guile-user@gnu.org; Wed, 15 Jan 2014 17:32:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3Z0a-0005AZ-FX for guile-user@gnu.org; Wed, 15 Jan 2014 17:32:30 -0500 Original-Received: from smtpout4.wanadoo.co.uk ([80.12.242.68]:46917 helo=smtpout.wanadoo.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3Z0a-0005AR-68 for guile-user@gnu.org; Wed, 15 Jan 2014 17:32:24 -0500 Original-Received: from bother.homenet ([95.146.112.102]) by mwinf5d58 with ME id ENYN1n00C2Ccjlb03NYNJp; Wed, 15 Jan 2014 23:32:23 +0100 Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with ESMTP id 3A5BA88504; Wed, 15 Jan 2014 22:32:30 +0000 (GMT) In-Reply-To: <87iotksyri.fsf@netris.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.68 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11022 Archived-At: On Wed, 15 Jan 2014 16:47:45 -0500 Mark H Weaver 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