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:
h323:[<user>@]<host>[:<port>][;<parameters>]
.
as well)
z39.50r://<host>[:<port>]/<database>?<docid>[;esn=<elementset>][;rs=<recordsyntax>]
:
)
paparazzi:http:[//<host>[:[<port>][<transport>]]/
So, what characters can I fancy using?
Can we have...
@:TwitterUser
#:HashTag
$:CapitalStock
?:ID-10T
...etc., as desired, or characters in the scheme are restricted by standard?
A URL is composed from a limited set of characters belonging to the US-ASCII character set. These characters include digits (0-9), letters(A-Z, a-z), and a few special characters ( "-" , "." , "_" , "~" ).
If the URI is telnet://192.0.2.16:80, the scheme name is "telnet."
Overview# Custom URI scheme is URI Scheme (as defined by RFC 3986) that a native application creates and registers with the Operating System (and is NOT a standard URI scheme like "https:" or "tel:").
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.
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 .
.
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 ("-").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With