[plt-scheme] patch to escape R6RS library names [was: SXML for R6RS]

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jul 9 11:44:04 EDT 2008

At Wed, 09 Jul 2008 01:51:34 -0700, Derick Eddington wrote:
> > To resolve this mismatch, we could extend the allowed syntax of `lib'
> > module elements to include %-escapes. That is, a `%' could be allowed
> > in a `lib' module-path element, as long as its followed by two
> > lowercase hexadecimal digits. From the perspective of mapping `lib'
> > paths to file names, this `%' isn't an encoding; it's just part of the
> > file name. But if R6RS library names are mapped to `lib' paths by UTF-8
> > encoding followed by %-encoding of all "special" characters, then
> > there's a 1-to-1 mapping (ignoring versioning and suffixes) between
> > R6RS paths and `lib' paths.
> > 
> > If that sounds ok, I can make the needed changes.
> > One more detail: we'd have to constrain `%' escapes in `lib' path
> > elements to rule out encodings of the characters that are currently
> > allowed. For example, "%41" (= "A", when read as an encoding) would be
> > disallowed.
> All that sounds ok to me.  Thanks!

Done in SVN.

While I was at it, I added a conversion on 'main used as the second
element of a 2-element library name, which avoids a collision with the
implicit 'main that is added to a 1-element library name. In general,
'main with any number of trailing underscores is converted by adding an
extra underscore.


Posted on the users mailing list.