From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Filename encoding Date: Wed, 15 Jan 2014 13:14:39 -0500 Message-ID: <87bnzdun74.fsf@netris.org> References: <20140115125246.53fc72c7@bother.homenet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389809837 32056 80.91.229.3 (15 Jan 2014 18:17:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 18:17:17 +0000 (UTC) Cc: guile-user@gnu.org To: Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jan 15 19:17:24 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 1W3V1m-0001Me-S0 for guile-user@m.gmane.org; Wed, 15 Jan 2014 19:17:22 +0100 Original-Received: from localhost ([::1]:56544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3V1m-0003oA-E2 for guile-user@m.gmane.org; Wed, 15 Jan 2014 13:17:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3V1Z-0003nL-Ih for guile-user@gnu.org; Wed, 15 Jan 2014 13:17:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3V1T-0005Xi-JV for guile-user@gnu.org; Wed, 15 Jan 2014 13:17:09 -0500 Original-Received: from world.peace.net ([96.39.62.75]:50651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3V1T-0005Xd-G2 for guile-user@gnu.org; Wed, 15 Jan 2014 13:17:03 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1W3V1M-0003vJ-U4; Wed, 15 Jan 2014 13:16:57 -0500 In-Reply-To: <20140115125246.53fc72c7@bother.homenet> (Chris Vine's message of "Wed, 15 Jan 2014 12:52:46 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 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:11000 Archived-At: Chris Vine writes: > A number of guile's scheme procedures look-up or reference files on a > file system (open-file, load and so forth). > > How does guile translate filenames from its internal string > representation (ISO-8859-1/UTF-32) to narrow string filename encoding > when looking up the file? Does it assume filenames are in locale > encoding (not particularly safe on networked file systems) or does it > provide a fluid for this? (glib caters for this with the > G_FILENAME_ENCODING environmental variable.) It assumes filenames are in locale encoding. Ditto for virtually everything that interfaces with POSIX-style byte strings, including environment variables, command-line arguments, etc. Encoding errors will raise exceptions by default. My hope is that this will become less of an issue over time, as systems increasingly standardize on UTF-8. I see no other good solution. Thoughts? Mark