From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: Filename encoding Date: Wed, 15 Jan 2014 23:00:18 +0200 Message-ID: <83sisp2c65.fsf@gnu.org> References: <20140115125246.53fc72c7@bother.homenet> <87bnzdun74.fsf@netris.org> <20140115195051.3272023c@bother.homenet> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1389819643 22568 80.91.229.3 (15 Jan 2014 21:00:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 21:00:43 +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 22:00:49 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 1W3XZw-0002G2-GL for guile-user@m.gmane.org; Wed, 15 Jan 2014 22:00:48 +0100 Original-Received: from localhost ([::1]:57162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3XZw-0004D3-0r for guile-user@m.gmane.org; Wed, 15 Jan 2014 16:00:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3XZd-0004Cw-Jh for guile-user@gnu.org; Wed, 15 Jan 2014 16:00:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3XZY-0003w9-BB for guile-user@gnu.org; Wed, 15 Jan 2014 16:00:29 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:41615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3XZY-0003vz-3t for guile-user@gnu.org; Wed, 15 Jan 2014 16:00:24 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MZG00K00NJGM300@a-mtaout22.012.net.il> for guile-user@gnu.org; Wed, 15 Jan 2014 23:00:22 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZG00KNPNOMJU10@a-mtaout22.012.net.il>; Wed, 15 Jan 2014 23:00:22 +0200 (IST) In-reply-to: <20140115195051.3272023c@bother.homenet> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 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:11017 Archived-At: > Date: Wed, 15 Jan 2014 19:50:51 +0000 > From: Chris Vine > 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.