From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#26353: VFS name encoding Date: Thu, 01 Jun 2017 13:28:27 +0200 Message-ID: <87o9u82bhg.fsf@gnu.org> References: <20170403202146.2a9317ce@scratchpost.org> <87poghdbge.fsf@gnu.org> <87mvb8f2a7.fsf@gnu.org> <20170423040301.53ea208f@scratchpost.org> <87fugo1efp.fsf@gnu.org> <20170601125743.6b13cd94@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGOHp-0000eF-6N for bug-guix@gnu.org; Thu, 01 Jun 2017 07:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGOHm-0006VO-1j for bug-guix@gnu.org; Thu, 01 Jun 2017 07:29:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGOHl-0006VK-UY for bug-guix@gnu.org; Thu, 01 Jun 2017 07:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGOHl-00069A-Og for bug-guix@gnu.org; Thu, 01 Jun 2017 07:29:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20170601125743.6b13cd94@scratchpost.org> (Danny Milosavljevic's message of "Thu, 1 Jun 2017 12:57:43 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 26353@debbugs.gnu.org Hi Danny, Danny Milosavljevic skribis: >> The problem of how to deal with file name encoding has been >> discussed on the Guile side so hopefully the next release in the 2.2 >> series will have a solution for this. > > For what it's worth, I think the sane solution is the Plan 9 solution: > Just represent file names as bytevectors. Programs which don't care > about the actual name - for example programs that just want to do > (for-each unlink (scandir (string->utf8 "."))) or something - have no > reason to care about the encoding at all. And then use UTF-8 encoding > everywhere (for the file names, also for everything else) throughout > the operating system for the tools that do care. FWIW the problem has been discussed at length in Guile land, although I don=E2=80=99t think anyone has come up with a complete solution yet. I think it=E2=80=99s natural to represent file names as strings, but we mad= e a mistake in 2.0 when we assumed we=E2=80=99d basically always be able to dec= ode file names using the current locale =E2=80=9Con sane systems=E2=80=9D. So = now we need a way to represent file names that cannot be decoded while preserving backward compatibility. To be continued! Ludo=E2=80=99.