I was thinking about Registering an Application to a URL Protocol and I\'d like to know, what characters are allowed in a scheme?
Some examples:
According to RFC 2396, Appendix A:
scheme = alpha *( alpha | digit | "+" | "-" | "." )
Meaning:
The scheme should start with a letter (upper or lower case), and can contains letters (still upper and lower case), number, "+", "-" and ".".
Note: in the case of
paparazzi:http:[//<host>[:[<port>][<transport>]]/
the scheme is only the "paparazzi" part.
Quoth RFC 2396:
Scheme names consist of a sequence of characters beginning with a lower case letter and followed by any combination of lower case letters, digits, plus ("+"), period ("."), or hyphen ("-").
The scheme according to RFC 3986 is defined as:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
So the scheme must begin with an alphabetic character (A
–Z
, a
–z
) and may be followed by any number of alphanumeric characters, +
, -
, or .
.