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

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