Request: library's file-name encoding follow PLT's
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
Wishlist
|
Abdulaziz Ghuloum |
Bug Description
Higher code-point characters get encoded weird:
Ikarus Scheme version 0.0.3+ (revision 1645, build 2008-10-22)
Copyright (c) 2006-2008 Abdulaziz Ghuloum
> (import (λ))
Unhandled exception
Condition components:
1. &error
2. &who: expander
3. &message: "cannot locate library in library-path"
4. &library-
library: (λ)
files: (... "./%rB.sls" ...)
>
While I don't think Ikarus's current way has an issue about any possible library names (i.e. any possible symbols) not having an unambiguous file-name encoding, I think it would be nicer to follow PLT's encoding [1] both because I think it's better and because it makes managing file-names across the two systems easier. Excerpt:
---
To ensure that all R6RS library names can be converted to a unique and distinct library module path, the following conversions are applied to each symbol before concatenating them:
* The symbol is encoded using UTF-8, and the resulting bytes are treated as Latin-1 encoded characters. ASCII letters, digits, +, -, and _ are left as-is; other characters are replaced by % followed by two lowercase hexadecimal digits. Note that UTF-8 encodes ASCII letters, digits, etc. as themselves, so typical library names correspond to readable module paths.
---
Changed in ikarus: | |
importance: | Undecided → Wishlist |
Changed in ikarus: | |
milestone: | none → 0.0.4 |
I agree that the higher-numbered characters are not encoded properly. Will fix that.
I won't follow the PLT convention to the letter, however, because I'm not going to require a directory structure (or "collects" in PLT lingo) for top-level libraries. I like having (acme) go to "acme.ss" without a silly directory between us. As long as there compatibility intersection between implementations is large, I don't see a problem having some "flavors".