W3C home > Mailing lists > Public > uri@w3.org > February 2004

Re: Status of draft-hoffman-rfc1738bis-01.txt

From: Gisle Aas <gisle@ActiveState.com>
Date: 03 Feb 2004 10:03:13 -0800
To: Julian Reschke <julian.reschke@gmx.de>
Cc: uri@w3.org, Paul Hoffman <paul.hoffman@vpnc.org>
Message-ID: <lry8rk3use.fsf@caliper.activestate.com>

Julian Reschke <julian.reschke@gmx.de> writes:

> I think an area where rfc1738bis *should* say something is in the area
> of mapping non-ASCII (or reserved ASCII) characters in path segment.
> 
> For instance, what are file URLs for the following Windows file names?
> 
> 1) "c:/Dokumente und Einstellungen"
> 2) "c:/a#b"
> 3) "c:/"
> 
> I guess everybody agrees on the answers for 1) and 2) (hex-escape the
> reserved character)

I don't know about this.  The perl URI module does this:

  $ perl -MURI::file -le 'print URI::file->new("c:/a#b", "msdos")'
  file://c:/a%23b

The reason is that this is the only way that gave sane results when
resolving relative URIs according to the standard URI rules.

Alternative mappings are:

   file:/c:/a%23b
   file:/c:a%23b

but these give strange results of you use them as base with relative
URIs like "./foo" and "../foo".

   abs("./foo", "file:/c:/a%23b")  ==> "file:/c:/foo"
   abs("../foo", "file:/c:/a%23b") ==> "file:/foo"

   abs("./foo", "file:/c:a%23b")   ==> "file:/foo"     
   abs("../foo"), "file:/c:a%23b") ==> "file:/../foo"

Regards,
Gisle
Received on Tuesday, 3 February 2004 13:03:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:07 UTC