Right now, the format Dialog uses to define resources is:
(define resource @IDENT) URL [ ; ALT-TEXT]
Where IDENT is an identifier for the resource, URL is either a URL starting with http, https, or mailto or a path to a local file, and the part in brackets is optional.
There’s a feature of the Å-machine that’s currently unused, that allows each resource to also embed an “option string” that the interpreter can use however it wants. For example, the option string could specify whether a sound should be looped or not, or the volume it should play at.
I’d like to add this capability to Dialog—but since absolutely anything is legal in the alt-text, the option string will have to go before it. (I want to maintain backward compatibility, and that means not suddenly reinterpreting part of a user’s alt-text as an option string.)
In other words, I want to change the specification to:
(define resource @IDENT) URL [DELIM OPTION] [ ; ALT-TEXT]
Where DELIM is some sort of delimiter.
The question is, what should that delimiter be? It can’t be ;
, for reasons of ambiguity. It can’t be anything that can legally appear in a URL, which rules out :
. And it should be printable ASCII, for the sake of users’ sanity. I would prefer to also avoid @
, #
, $
, (
, )
, [
, ]
, {
, }
, since those always need to be escaped in Dialog source text, but they’re not entirely off the table.
The set of characters that’s legal in a URL seems like the sort of thing that should be easy to look up, but different sources have given me different answers—but, I figure IF people do enough with HTML that they’ve probably thought about this before!