[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Encoding Windows reserved charactes
- To: srfi-103@xxxxxxxxxxxxxxxxx
- Subject: Re: Encoding Windows reserved charactes
- From: Derick Eddington <derick.eddington@xxxxxxxxx>
- Date: Thu, 24 Sep 2009 10:45:51 -0700
- Cc: cowan@xxxxxxxx
- Delivered-to: srfi-103@xxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=tjwz4QGBZJhohJuATgEBMVEPym0BXc/oEIO6fKLYXgo=; b=bh1paL77EiRelT8a5luNk3waqhNwZS0ONmVhGY1oL27VOeerJ/8+qmpSfz9b1gn/6z HU4VxtFVtdKCEiCkYD9dl9BZud/1sOWrL6perLsK68hgvq/3FXaQSqb5veKLfpJ+EsX7 XWSyAXCzofpw2BWsa+QYkNSU+ofLyRzsOL82w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=pPA35sT7YnbiI9sGpNKCsDGtD4fVqphHkDGM/K2MuCc0TW5q+lOFc39zVin0QabZ8y V31djV/vAdQ6SPtK7jN5Fa8juJLBlX4NVDoYX3FmpYYY3PSi7/sIuvfI6ycgnr0pVf+l 6aTefZtJ7xrn4MEa+OvD/GpWk+UeBddF+Wf94=
John Cowan wrote:
> I think it is sensible to require encoding of all the characters that
> Windows doesn't allow in path components, viz. #\<, #\>, #\:, #\|,
> #\?, #\*, and #x0; through #x1F;. Posix allows all but #\x0;, but
> the remainder, though technically permitted, are nothing but nuisances
> in pathname components, as they must be escaped when referred to from
> the shell. (#\: is an exception, but doesn't show up in Posix filenames
> often either.)
> In addition, the Windows executive treats #\\ and #\/ both as path
> separators, a fact occasionally convenient, although the UI disallows #\/.
> So I'd escape both of them in all cases too.
I have been conflicted about this issue as I was drafting this SRFI.
One part of me wants to say:
I'm disinclined to make SRFI 103 require encoding any characters except
the four it uses specially which must be. However, as the document
says, an implementation may encode any additional characters it wants.
Always encoding the characters which Windows disallows, or which are
nuisances in shells, may very well be the de facto for the near future.
However, in the farther future, these characters may not need encoding,
and other OSs and shells may have greater prevalence than Windows,
POSIX, and Bash. Even if the Windows-disallowed and shell-nuisance
characters were required to be encoded, there could still exist
characters which some file systems need encoded but others do not, e.g.
file systems of OSs other than Windows or POSIX, and so communicating
what characters to encode and coordinating transcoding path names would
still be required.
Another part of me thinks:
It's not a big deal. Not requiring encoding other cultures' languages'
characters, and not requiring encoding other non-natural-language
character-symbols which I want to explore using in library names, and
promoting progress to file systems which can handle all characters, *is*
a big deal to me. But this small set of Windows-disallowed and
shell-nuisance characters probably won't be common in library names and
can be sacrificed if it really helps portability. And we can always
make a new SRFI in the future which revises this one to get rid of
requiring encoding these characters.
The question is: what is the exact set of characters which should be
required to be encoded? I've heard different descriptions of what
Windows/DOS disallows. Does it differ between versions? What eras of
Microsoft OSs do we want to cater to? Surely, some shells differ in
what are nuisance characters? What shells should be catered to for the
nuisance characters to encode?