[apps-discuss] Filesystem I18N, again (Re: Fwd: FW: New Version Notification for draft-kerwin-file-scheme-13.txt)

Nico Williams <nico@cryptonector.com> Mon, 12 January 2015 06:06 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 45C721A89F1 for <apps-discuss@ietfa.amsl.com>; Sun, 11 Jan 2015 22:06:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LewYgo_DS2h6 for <apps-discuss@ietfa.amsl.com>; Sun, 11 Jan 2015 22:06:43 -0800 (PST)
Received: from homiemail-a104.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 9C5831A8895 for <apps-discuss@ietf.org>; Sun, 11 Jan 2015 22:06:43 -0800 (PST)
Received: from homiemail-a104.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a104.g.dreamhost.com (Postfix) with ESMTP id 61FCF2005C231; Sun, 11 Jan 2015 22:06:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=8O/9qra/dxgU4B XTf4kkcGyY2GQ=; b=LYflO4I6h66MMyGtY0Q19vXY7emrOcgky/IDb/C5mg5PsR A6wq0ETAPUVaI6qZM3xR8FdSjDcadLODtMtu6ffb/tCjrxPeX5SPJTk5Aei+KdA7 DCxFXODYNxBurHaJAb+02+CHztIETn/G9T127ahMM+pNjcypYe4aY/R3jH9rI=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a104.g.dreamhost.com (Postfix) with ESMTPA id 020052008232A; Sun, 11 Jan 2015 22:06:42 -0800 (PST)
Date: Mon, 12 Jan 2015 00:06:42 -0600
From: Nico Williams <nico@cryptonector.com>
To: Matthew Kerwin <matthew@kerwin.net.au>
Message-ID: <20150112060641.GH16323@localhost>
References: <20140926010029.26660.82167.idtracker@ietfa.amsl.com> <EAACE200D9B0224D94BF52CF2DD166A425A68A90@ex10mb6.qut.edu.au> <CACweHNBEYRFAuw9-vfeyd_wf703cvM3ykZoRMqAokRFYG_O7hQ@mail.gmail.com> <DM2PR0201MB09602B351692D424A49C6B0DC3650@DM2PR0201MB0960.namprd02.prod.outlook.com> <CACweHNBN_Bv=jeXQ_VwXi2HzHKNEwZJ1NiF-BJJo_9-mhO60gQ@mail.gmail.com> <54A557E1.6050502@intertwingly.net> <CACweHNCQZg1U1u8U=-f6h0+BPnp6Wr_T=r_wGiPAbhTbuMCGWQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CACweHNCQZg1U1u8U=-f6h0+BPnp6Wr_T=r_wGiPAbhTbuMCGWQ@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/apps-discuss/M-bw_3WUewl6DynbEW71U-a0MPc>
Cc: IETF Apps Discuss <apps-discuss@ietf.org>, Larry Masinter <masinter@adobe.com>
Subject: [apps-discuss] Filesystem I18N, again (Re: Fwd: FW: New Version Notification for draft-kerwin-file-scheme-13.txt)
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2015 06:06:46 -0000

On Sun, Jan 04, 2015 at 10:22:59PM +1000, Matthew Kerwin wrote:
> Importantly, I don't want to include every codepath in every implementation
> that exists, but I don't want the definition I write to *not* work in any
> implementations.

I suspect we'll have to make some choices then.

> [1] http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx

Yes, there's an aliasing problem when IRIs are encoded onto URIs where
some of the URI consumers simply decode into bytes in non-UTF-8,
non-ASCII locales.  This is not something that the IETF ignored, it's
just something that the IETF couldn't fix.

Many filesystems allow just about any byte values other than the
traditional path component separator character(s) (ASCII slash and, for
Windows, _also_ backslash), and so we have an interop problem.

I don't think we should have this discussion every time a filesystem-
related protocol comes up!  We should have a spec we can reference from
specs dealing with filesystems.

We've had this discussion in quite a few contexts (e.g., WebDAV, NFSv4,
even PKCS#11 URIs just now; and probably many more).

The facts are:

 - filesystems exist with non-Unicode, non-ASCII object names (files,
   directories, symlinks, ...), and/or which allow new such names to be
   created at any time;

 - interpretation of such octet strings is necessarily locale-specific;

 - non-Unicode, non-ASCII locales exist and will continue to for some
   time;

 - often the only entities that know a filesystem object name's codeset
   are end users;

 - we have Internet protocols that need to interface to these
   filesystems;

 - we also have local interfaces involved that aren't Internet
   protocols.

(It gets worse.  We even have a filesystem that uses an inconvenient
Unicode normalization.  But the above facts will do for now.)

The thing to do is to demand [normalized] Unicode on the wire.  We can't
really achieve that, but we (the IETF) demand it anyways and note the
problems that result from not knowing what codeset is used for a given
character string because we only know it as an octet string.  (Those
problems don't arise from demanding UTF-8 on the wire.)

We do this because the only alternative that can interop is to tag these
strings with codeset metadata, but since a) we lack that metadata (see
facts above), and b) it would be *much* more work to start carrying that
metadata everywhere than it would be to convert to/from Unicode at the
boundaries where we *do* have that metadata... we do the simpler thing
of demanding Unicode in the middle.

The same applies to the file scheme.  Yes, you can get in trouble if you
mix non-ASCII names with locales with various different codesets, so
what?  We should still say that RFCs 3986 and 3987 apply.

Longer term, what should really happen is that filesystem _APIs_ that
just-use-8 today should start doing conversion to/from Unicode so that
"the middle" (e.g., the VFS layer, the wire, ...) can carry Unicode and
the "edges" (the filesystem's on-disk format, the APIs) can carry
whatever is locally appropriate, and then end users should clean up as
necessary (tools for this are common).

This is a bit like boiling a Great lake: do we really expect C runtimes
for various OSes to do this?  I'd like to expect that, yes, though I
won't hold my breath.  But it's better than the alternative (see above).

Nico
--