<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="31" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[31]</anchor-end> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> における<dfn><rubyb xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">予約<rt xmlns="http://www.w3.org/1999/xhtml">reserved</rt></rubyb></dfn>とは、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor>の分類の1つでした。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="32" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[32]</anchor-end> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> で特別な意味を持つ (ことがある) <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor>が属しています。</p><section><h1>関連</h1><ul><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">非予約文字</anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">非安全文字</anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">百分率符号化</anchor></li></ul></section><section><h1>歴史</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="30" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[30]</anchor-end> 
初期の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> 仕様はいろいろな概念が改訂ごとに少しずつ違っていることに定評(?)がありましたが、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">予約文字</anchor>もそのような混乱の代表的な事例といえます。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="26" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[26]</anchor-end> 「予約」と言う時に、すべての<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">予約文字</anchor>のこと (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ABNF</anchor> における <code class="ABNF" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">reserved</anchor></code>
のこと) を指していることもあれば、特定の文脈において<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">予約</anchor>されている<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">文字</anchor>だけを指していることもあり、
注意が必要です。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <ul><li>rfc1630.body.reserved = &lt;[%/#?*]&gt;</li><li>rfc1630.reserved = &lt;[=;/#?:]&gt; / <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SP</anchor></li><li>rfc1738.reserved = &lt;[;/?:@&amp;=]&gt;</li><li>rfc1808.reserved = rfc1738.reserved</li><li>rfc2068.reserved = &lt;[;/?:@&amp;=+]&gt;</li><li>rfc2396.reserved = &lt;[;/?:@&amp;=+$,]&gt;</li><li>rfc2732.reserved = &lt;[;/?:@&amp;=+$,]&gt; / &quot;[&quot; / &quot;]&quot;</li><li>rfc3986.reserved = rfc3987.reserved = <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">gen-delims</anchor> / <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">sub-delims</anchor> = &lt;[;/?:@&amp;=+$,!'()*#]&gt; / &quot;[&quot; / &quot;]&quot;</li></ul></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="22" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[22]</anchor-end>
1630 -&gt; 1738 では
<code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><strong xmlns="http://www.w3.org/1999/xhtml">#</strong></anchor></code> と
<code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">%</anchor></code>
と <code class="char">SP</code>
が消えました。
そして
<code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">@</anchor></code> が新たに追加されました。
URI の範囲 <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">(<anchor>素片識別子</anchor>及びその前の <code xmlns="http://www.w3.org/1999/xhtml" class="URI">#</code> は URI に含まない。)</weak>
及び予約集合の意味
<weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">(方式によっては特別な意味を持ち得る文字種。)</weak>
を明確化した結果でしょう。</p><p><code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&amp;</anchor></code> も新たに追加されましたが、
こちらは <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor>
の <code class="HTML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">form</anchor></code>
機能の追加を受けたものです。</p><p>1738 -&gt; 2396 で追加された
<code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">+</anchor></code>
は従来<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">問合せ文字列</anchor>で間隔の代替とされていたもので、
区切り文字としての役割を明確化したと言えるでしょう。
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2068</anchor> は先取りしています。)</p><p><code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">,</anchor></code> と
<code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">$</anchor></code>
も区切りとして使われることがあるので取り上げて明確化したのでしょう。</p><ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> 2396 G.2 の説明で余計わかりにくくなっている気がしますが、 reserved 集合に含まれている文字は方式やその示す資源によって特別な意味を持つ可能性がありますが、それ以外の文字についてはその可能性はありません。 (ないはずです。というのは、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">unreserved</anchor> の説明で unreserved 文字は escape してもしなくても等価であることが述べられているからです。)</li></ul><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2732</anchor> は、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">IPv6</anchor> アドレスを表現するために
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">unwise</anchor> だった
<code class="URI"><strong>[</strong></code> 及び
<code class="URI"><strong>]</strong></code> を reserved
に追加しました。</p><p>このことをどう解釈したらいいか微妙です。<ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> 追加の目的は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">host</anchor> 部分での
IPv6 adderess の表現を認めることだ。
2732 が改訂した生成規則 host 
以外での両括弧の使用は認められない。</li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> IPv6 アドレスを表現するという予約目的で両括弧の使用を認めると
2732 は言っている。 IPv6 アドレスを表現する限りは自由に使って良い。</li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> reserved に両括弧は追加されたのだ。それ以上でもそれ以下でもない。
両括弧は今後 URI で自由に使える。</li></ul></p><p>例で示すなら、<ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end> <samp class="URI">http://[0:2:3::5:5]/foo.example</samp></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[19]</anchor-end> <samp class="URI">x-some-scheme:foo:[0::1:2:3]:bar</samp></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[20]</anchor-end> <samp class="URI">x-some-scheme:foo[bar];</samp></li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="21" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[21]</anchor-end> <samp class="URI">x-some-scheme:foo]bar</samp></li></ul></p><p>の <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;18</anchor-internal> 例が 2732 の主目的なわけです。
<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;15</anchor-internal> は <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;18</anchor-internal> しか認めない意見。
<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;16</anchor-internal> は<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;18</anchor-internal> と <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;19</anchor-internal>
はみとめる。 <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;17</anchor-internal> は <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;20</anchor-internal>
も <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="21" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;21</anchor-internal> も OK という意見。</p><p>どれが正しいのでしょう?</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986</anchor>・<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3987</anchor> では
<code class="char">!</code>, <code class="char">'</code>, <code class="char">(</code>,
<code class="char">)</code>, <code class="char">*</code>, <code class="char">#</code>
が追加されました。 <code class="char">#</code> は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">素片識別子</anchor>が URI
の一部であることに定義が改められたことによるものでしょう。</p><p><code class="char">*</code> が予約文字になってしまうと、
この文字を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ワイルド・カード</anchor>として使い、
本来の星印を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">百分率符号化</anchor>オクテット表現にしていた
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URIパターン</anchor>は汎用性を失ってしまいます。。。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="24" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[24]</anchor-end>
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986</anchor>によると<code class="char"><strong>[</strong></code>と<code class="char"><strong>]</strong></code>が使えるのは<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">命名権者</anchor>部の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">IP番地</anchor>としてだけです。</p><p>ということは、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URI</anchor> <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">(<anchor>素片識別子</anchor>を除く。)</weak> を直接含む<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URI</anchor>が一般には作れないことになります。。。</p><section><h1>RFC 1630</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <csection xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Reserved characters</csection></figcaption><blockquote><p>The path in the URI has a significance defined by the particular
scheme.  Typically, it is used to encode a name in a given name
space, or an algorithm for accessing an object.  In either case, the
encoding may use those characters allowed by the BNF syntax, or
hexadecimal encoding of other characters.</p></blockquote><p>URI 中の経路 <ins>(訳注: 方式名の後の <code class="URI">:</code> の更に後の部分。)</ins>
はその特定の方式で規定された意味を持ちます。
典型的には、当該名前空間中の名前や物体に接続する算法を符号化するのに使います。
いずれの場合でも、符号化は BNF
構文で認められている文字又はそれ以外の文字の16進数符号化を使って構いません。</p><blockquote><p>Some of the reserved characters have special uses as defined here.</p></blockquote><p>幾つかの予約文字はここで定義する特別な用法を持ちます。</p><section><h1>THE PERCENT SIGN</h1><blockquote><p>The percent sign (&quot;%&quot;, ASCII 25 hex) is used as the escape
character in the encoding scheme and is never allowed for anything
else.</p></blockquote><p>百分率記号 (<code class="char">%</code>,
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ASCII</anchor> 16進 <code class="char">25</code>)
は符号化方式の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">escape</anchor>
文字として使用し、
それ以外では決して認められません。</p></section><section><h1>HIERARCHICAL FORMS</h1><blockquote><p>The slash (&quot;/&quot;, ASCII 2F hex) character is reserved for the
delimiting of substrings whose relationship is hierarchical.  This
enables partial forms of the URI.  Substrings consisting of single
or double dots (&quot;.&quot; or &quot;..&quot;) are similarly reserved.</p></blockquote><p>斜線 (<code class="char"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">/</anchor></code>, ASCII
16進 <code class="char">2F</code>)
文字はその関係が階層的である部分文字列を区切るのに予約します。
これは URI の部分形式 <ins>(訳注: 相対 URI のこと。)</ins> を可能にします。
1つ又は2つの点 (<code class="URI">.</code>
又は <code class="URI">..</code>)
を含む部分文字列も同様に予約します。</p><blockquote><p>The significance of the slash between two segments is that the
segment of the path to the left is more significant than the
segment of the path to the right. (&quot;Significance&quot; in this case
refers solely to closeness to the root of the hierarchical
structure and makes no value judgement!)</p></blockquote><p>2つの部分の間の斜線の意味は、
経路の左側の部分が経路の右側の部分よりも重要であるということです。
(ここで<em>重要</em>とは単に階層構造の根に近いことを指すだけで何の価値判断もしていません!)</p><blockquote><p>Note</p><p>The similarity to unix and other disk operating system filename
conventions should be taken as purely coincidental, and should
not be taken to indicate that URIs should be interpreted as
file names.</p></blockquote><p>Unix や他のディスク・オペレーティング・システムのファイル名の表記法との類似性は純粋に偶然と取るべきで、
URI がファイル名として解釈されるべきであると取るべきではありません。</p></section><section><h1>HASH FOR FRAGMENT IDENTIFIERS</h1><blockquote><p>The hash (&quot;#&quot;, ASCII 23 hex) character is reserved as a delimiter
to separate the URI of an object from a fragment identifier .</p></blockquote><p>Hash (<code class="char">#</code>, ASCII
16進 <code class="char">23</code>)
文字は物体の URI と<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">素片識別子</anchor>を分離する区切子として予約します。</p></section><section><h1>QUERY STRINGS</h1><blockquote><p>The question mark (&quot;?&quot;, ASCII 3F hex) is used to delimit the
boundary between the URI of a queryable object, and a set of words
used to express a query on that object.  When this form is used,
the combined URI stands for the object which results from the
query being applied to the original object.</p></blockquote><p>疑問符 (<code class="char">?</code>, ASCII
16進 <code class="char">3F</code>)
は問合せ可能な物体の URI
とその物体への問合せを表現するのに使用する語の集合の間の境界を区切るのに使います。
この形式を使用する時には、
結合した URI
は元の物体に問合せを適用した結果の物体を意味します。</p><blockquote><p>Within the query string, the plus sign is reserved as shorthand
notation for a space.  Therefore, real plus signs must be encoded.
This method was used to make query URIs easier to pass in systems
which did not allow spaces.</p></blockquote><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">問合せ文字列</anchor>の中では、
正符号を間隔の簡略記法として予約します。
従って、真の正符号は符号化しなければなりません。
この方式は、問合せ URI を間隔を認めないシステムでより簡単に渡せるように使われていました。</p><blockquote><p>The query string represents some operation applied to the object,
but this specification gives no common syntax or semantics for it.
In practice the syntax and sematics may depend on the scheme and
may even on the base URI.</p></blockquote><p>問合せ文字列は物体に適用する幾らかの操作を表現しますが、
この仕様書はその共通の構文や意味を与えません。
実際上は構文と意味は方式に依存するかもしれませんし、また基底
URI にも依存するかもしれません。</p><insert xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml">訳注: ここで<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">基底URI</anchor>とは相対 URI
に対する基底ではなくて、問合せ文字列を除いた部分と理解すれば良いのでしょうか?</p></insert></section><section><h1>OTHER RESERVED CHARACTERS</h1><blockquote><p>The astersik (&quot;*&quot;, ASCII 2A hex) and exclamation mark (&quot;!&quot; , ASCII
21 hex) are reserved for use as having special signifiance within
specific schemes.</p></blockquote><p>星印 (<code class="char">*</code>, ASCII
16進 <code class="char">2A</code>)
及び感嘆符
(<code class="char">!</code>, ASCII 16進
<code class="char">21</code>)
は特定の方式中で特別な意味を持って使用するのに予約します。</p></section></figure><ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <code class="BNF">reserved               =  |  ;  |  /  |  #  | ? |  : | space</code></li></ul><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> 本文中の <code>Reserved characters</code> と BNF の <code>reserved</code> は何やら意味が違うみたいです。なお、 <code class="URI">!</code> 及び <code class="URI">*</code> は BNF では <code><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">extra</anchor></code> に分類されています。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;2</anchor-internal> ではちょっとわかりにくいかもしれませんが、 <code>=</code> も <code>reserved</code> の一選択肢です (BNF の代入(というか定義)記号ではありません)。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> つまりですよ。 <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://foo.example/foo:bar">http://foo.example/foo:bar</anchor-external> と <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://foo.example/foo%3Abar">http://foo.example/foo%3Abar</anchor-external> は同じかどうか一意には定まらないということですな。そらー厄介だ。</p></section><section><h1>RFC 1738</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> </figcaption><blockquote><p>Reserved:</p><p>Many URL schemes reserve certain characters for a special meaning:
their appearance in the scheme-specific part of the URL has a
designated semantics. If the character corresponding to an octet is
reserved in a scheme, the octet must be encoded.  The characters &quot;;&quot;,
&quot;/&quot;, &quot;?&quot;, &quot;:&quot;, &quot;@&quot;, &quot;=&quot; and &quot;&amp;&quot; are the characters which may be
reserved for special meaning within a scheme. No other characters may
be reserved within a scheme.</p></blockquote><p>多くの URL 方式が、
特定の文字群を特別な意味に予約しています。
これらの文字が URL
中の方式指定 (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">scheme-specific</anchor>)
部分に出現することには指示された意味があります。
あるオクテットに対応する文字が方式中で予約されている場合、
そのオクテットは符号化しなければなりません。
文字
<code class="URI">;</code>, <code class="URI">/</code>, <code class="URI">?</code>, <code class="URI">:</code>, <code class="URI">@</code>, <code class="URI">=</code>, <code class="URI">&amp;</code>
は方式中で特別な意味に予約されているかもしれない文字です。
他の文字は方式中で予約されることはありません。</p><blockquote><p>Usually a URL has the same interpretation when an octet is
represented by a character and when it encoded. However, this is not
true for reserved characters: encoding a character reserved for a
particular scheme may change the semantics of a URL.</p></blockquote><p>通常、 URL はあるオクテットが文字で表現されていた場合と符号化されていた場合とで同じ解釈を持ちます。
しかし、これは予約文字に対しては真ではありませ。
特定の方式で予約されている文字を符号化することは、
URL の意味を変更し得ます。</p><blockquote><p>Thus, only alphanumerics, the special characters &quot;$-_.+!*'(),&quot;, and
reserved characters used for their reserved purposes may be used
unencoded within a URL.</p></blockquote><p>従って、英数字, 特殊文字
<code>$-_.+!*'(),</code>,
その予約目的に使われている予約文字だけが
URL 中で符号化せずに使えます。</p><blockquote><p>On the other hand, characters that are not required to be encoded
(including alphanumerics) may be encoded within the scheme-specific
part of a URL, as long as they are not being used for a reserved
purpose.</p></blockquote><p>他方、符号化される必要のない文字
(英数字を含む。)
は、それが予約目的で使われていない限り、
URL の方式指定部分中で符号化しても構いません。</p></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">BNF</anchor> では</p><ul><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> 
<code class="ABNF"><dfn>reserved</dfn>       = &quot;;&quot; | &quot;/&quot; | &quot;?&quot; | &quot;:&quot; | &quot;@&quot; | &quot;&amp;&quot; | &quot;=&quot;</code> </li></ul><p>と定義されています。</p></section><section><h1>RFC 2396</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> 2.2. Reserved Characters</figcaption><blockquote><p>Many URI include components consisting of or delimited by, certain
special characters.  These characters are called &quot;reserved&quot;, since
their usage within the URI component is limited to their reserved
purpose.  If the data for a URI component would conflict with the
reserved purpose, then the conflicting data must be escaped before
forming the URI.</p></blockquote><p>多くの URI は特定の特別な文字群で構成されたり区切られたりした部品群を復位増す。
そうした文字群を、
その URI 部品中での用途が予約された目的に限定されることから、
「予約(済み)」と呼びます。
URI 部品のデータが予約目的と衝突する時には、
衝突するデータは URI
を形成する前に符号化しなければなりません。</p><blockquote><ul><li>reserved    = &quot;;&quot; | &quot;/&quot; | &quot;?&quot; | &quot;:&quot; | &quot;@&quot; | &quot;&amp;&quot; | &quot;=&quot; | &quot;+&quot; | &quot;$&quot; | &quot;,&quot;</li></ul><p>The &quot;reserved&quot; syntax class above refers to those characters that are
allowed within a URI, but which may not be allowed within a
particular component of the generic URI syntax; they are used as
delimiters of the components described in Section 3.</p></blockquote><p>上記の
<code class="ABNF">reserved</code> (予約済み)
構文種別は、 URI 中で許されてはいるが、
一般 URI 構文の特定の部品の中では許されないかもしれない文字を示しています。
これらの文字は3章で説明する部品群の区切りに使います。</p><blockquote><p>Characters in the &quot;reserved&quot; set are not reserved in all contexts.
The set of characters actually reserved within any given URI
component is defined by that component. In general, a character is
reserved if the semantics of the URI changes if the character is
replaced with its escaped US-ASCII encoding.</p></blockquote><p>「予約」集合中の文字は全ての文脈で予約されているわけではありません。
ある URI 部品の中で通常予約されている文字の集合はその部品により定義されてます。
通常、ある文字はその文字を符号化した
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">US-ASCII</anchor> 符号化に置換した時に
URI の意味が変わるなら、予約とします。</p></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> G.2 (抜粋)</figcaption><blockquote><p>Both RFC 1738 and RFC 1808 refer to the &quot;reserved&quot; set of characters
as if URI-interpreting software were limited to a single set of
characters with a reserved purpose (i.e., as meaning something other
than the data to which the characters correspond), and that this set
was fixed by the URI scheme.  However, this has not been true in
practice; any character that is interpreted differently when it is
escaped is, in effect, reserved.  Furthermore, the interpreting
engine on a HTTP server is often dependent on the resource, not just
the URI scheme.  The description of reserved characters has been
changed accordingly.</p></blockquote><p>RFC 1738 も RFC 1808 も、
「予約」文字集合を URI
を解釈するソフトウェアは単一の予約目的の文字集合に限られている
(つまり、文字が対応するデータ以外の何かを意味するものである)
のであって、この集合は URI
方式で固定されているかのように言及していました。
しかし、これは実際には真ではありません。
Escape された時に違って解釈されるどんな文字も実質的に予約されているのです。
更に、 HTTP サーバー上の解釈原動機はしばしば、
URI 方式だけにではなく資源にも依存します。
これにしたがって予約文字の説明は改められました。</p><blockquote><p>The plus &quot;+&quot;, dollar &quot;$&quot;, and comma &quot;,&quot; characters have been added to
those in the &quot;reserved&quot; set, since they are treated as reserved
within the query component.</p></blockquote><p>正 <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">+</anchor></code>,
弗 <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">$</anchor></code>,
読点 <code class="URI"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">,</anchor></code>
各文字を「予約」集合に加えました。
これらの文字は問合せ部品中で予約済みとして扱われます。</p></figure></section><section><h1>RFC 2732</h1><p><sw-see xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"> <anchor>RFC 2732</anchor> </sw-see></p></section><section><h1>CGI における定義</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="27" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[27]</anchor-end> <pre class="ABNF code">      reserved = &quot;;&quot; | &quot;/&quot; | &quot;?&quot; | &quot;:&quot; | &quot;@&quot; | &quot;&amp;&quot; | &quot;=&quot; | &quot;+&quot; | &quot;$&quot; |
                 &quot;,&quot; | &quot;[&quot; | &quot;]&quot;</pre></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="28" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[28]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CGI</anchor> における <code class="ABNF" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">reserved</anchor></code> は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2732</anchor> の定義と一致しています。</p><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="29" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[29]</anchor-end> <cite xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3875</anchor> - The Common Gateway Interface (CGI) Version 1.1</cite> (<time>2011-11-20 06:09:05 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc3875#section-2.3">http://tools.ietf.org/html/rfc3875#section-2.3</anchor-external></li></ul></refs></section><section><h1>RFC 3986 (URI 4<sup>th</sup>), RFC 3987 (IRI)</h1><p><sw-see xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"> <anchor>RFC 3986//2</anchor> </sw-see></p></section><section><h1><cite>URL Standard</cite></h1><ed xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"></ed></section></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="23" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[23]</anchor-end>
誤って URI 参照で使うことがみとめられていない文字のことを <q>reserved</q> とか<q>予約</q>とかいうことがあります。</p><p>URI で使えない文字とは異なり、
予約文字は URI では使えます。</p></section></body></html>