URI 方案的有效字符?

发布于 2024-09-17 20:29:48 字数 1029 浏览 4 评论 0原文

我正在考虑将应用程序注册到 URL 协议,然后我'我想知道方案中允许使用哪些字符?

一些示例:

  • h323 (有数字)
    • h323:[<用户>@]<主机>[:<端口>][;<参数>]
  • z39.50r (也有 .
    • z39.50r://<主机>[:<端口>]/<数据库>?[;esn=<元素集>][;rs=<记录语法>; ]
  • paparazzi:http (有一个 :
    • 狗仔队:http:[//<主机>[:[<端口>][<传输>]]/

那么,我可以使用哪些字符?
我们可以...

  • @:TwitterUser
  • #:HashTag
  • $:CapitalStock
  • ?:ID-10T

..等等,根据需要,还是方案中的字符受标准限制?

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 (has numbers)
    • h323:[<user>@]<host>[:<port>][;<parameters>]
  • z39.50r (has a . as well)
    • z39.50r://<host>[:<port>]/<database>?<docid>[;esn=<elementset>][;rs=<recordsyntax>]
  • paparazzi:http (has a :)
    • 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我不是你的备胎 2024-09-24 20:29:48

根据RFC 2396,附录A:

  scheme        = alpha *( alpha | digit | "+" | "-" | "." )

含义:

该方案应以字母(上或小写),并且可以包含字母(仍然是大写和小写)、数字、“+”、“-”和“.”。


注:本例中的

paparazzi:http:[//<host>[:[<port>][<transport>]]/

方案仅是“狗仔队”部分。

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.

短暂陪伴 2024-09-24 20:29:48

根据 RFC 3986 的方案定义为:

scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

因此,该方案必须以字母字符(AZaz)开头,并且可以遵循由任意数量的字母数字字符、+-. 组成。

The scheme according to RFC 3986 is defined as:

scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

So the scheme must begin with an alphabetic character (AZ, az) and may be followed by any number of alphanumeric characters, +, -, or ..

等往事风中吹 2024-09-24 20:29:48

引用 RFC 2396

方案名称由以 a 开头的字符序列组成
小写字母,后跟小写字母的任意组合
字母、数字、加号(“+”)、句号(“.”)或连字符(“-”)。

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 ("-").

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文