3 ms·
This is an excellent point that I had not considered, thanks! I'm actually leaning towards a slightly different scheme now that would address this, where I use
by simonw 5y ago
This is an excellent point that I had not considered, thanks!
I'm actually leaning towards a slightly different scheme now that would address this, where I use regular percentage encoding but with the hyphen character instead of the percentage character.
I'll write an update if I decide to go with that approach.
- kragen 5y agoI look forward to reading it! Your blog is always a pleasure.
- lilyball 5y agoAre you intentionally trying to preserve lexicographic ordering? If so, doing percent-encoding-but-with-dash is reasonable and pretty easy to explain. If you don't care about lexicographic ordering then I would recommend picking a different character than dash. Even if Datasette's particular set of tables don't use dash in their name, if you're hoping other people will use this same scheme then using a more esoteric character might be nice. Using &/$/! would still preserve ordering relative to alphabetic characters and are not commonly found in URL paths.