source: draft-ietf-iri-3987bis/draft-ietf-iri-3987bis.xml @ 115

Last change on this file since 115 was 115, checked in by duerst@…, 7 years ago

updated explanation of 'XML Notation' to discuss document versions without ASCII limitations

  • Property svn:executable set to *
File size: 90.9 KB
Line 
1<?xml version="1.0"?>
2<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
3<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
4<!ENTITY rfc2130 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2130.xml">
5<!ENTITY rfc2141 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2141.xml">
6<!ENTITY rfc2192 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2192.xml">
7<!ENTITY rfc2277 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2277.xml">
8<!ENTITY rfc2384 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2384.xml">
9<!ENTITY rfc2396 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2396.xml">
10<!ENTITY rfc2397 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2397.xml">
11<!ENTITY rfc2616 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml">
12<!ENTITY rfc2640 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2640.xml">
13<!ENTITY rfc3491 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3491.xml">
14<!ENTITY rfc3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
15<!ENTITY rfc5122 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5122.xml">
16<!ENTITY rfc5890 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5890.xml">
17<!ENTITY rfc5891 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5891.xml">
18<!ENTITY rfc6055 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6055.xml">
19]>
20<?rfc strict='yes'?>
21
22<?xml-stylesheet type='text/css' href='rfc2629.css' ?>
23<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
24<?rfc symrefs='yes'?>
25<?rfc sortrefs='yes'?>
26<?rfc iprnotified="no" ?>
27<?rfc toc='yes'?>
28<?rfc compact='yes'?>
29<?rfc subcompact='no'?>
30<rfc ipr="pre5378Trust200902" docName="draft-ietf-iri-3987bis-11" category="std" xml:lang="en" obsoletes="3987">
31<front>
32<title abbrev="IRIs">Internationalized Resource Identifiers (IRIs)</title>
33
34<author initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst   (Note: Please write &quot;Duerst&quot; with u-umlaut wherever possible, for example as &quot;D&amp;#252;rst&quot; in XML and HTML.)">
35    <organization>Aoyama Gakuin University<ionly> (青山学院大学)</ionly> </organization>
36    <address>
37  <postal>
38  <street>5-10-1 Fuchinobe</street>
39  <street>Chuo-ku</street>
40  <city>Sagamihara</city>
41  <region>Kanagawa</region>
42  <code>252-5258</code>
43  <country>Japan</country>
44  </postal>
45  <phone>+81 42 759 6329</phone>
46  <facsimile>+81 42 759 6495</facsimile>
47  <email>duerst@it.aoyama.ac.jp</email>
48  <uri><aonly>http://www.sw.it.aoyama.ac.jp/D%C3%BCrst/ (Note: This is the percent-encoded form of an IRI)</aonly><ionly>http://www.sw.it.aoyama.ac.jp/Dürst/</ionly></uri>
49  </address>
50</author>
51 
52  <author initials="M.L." surname="Suignard" fullname="Michel Suignard">
53   <organization>Unicode Consortium</organization>
54   <address>
55   <postal>
56   <street></street>
57   <street>P.O. Box 391476</street>
58   <city>Mountain View</city>
59   <region>CA</region>
60   <code>94039-1476</code>
61   <country>U.S.A.</country>
62   </postal>
63   <phone>+1-650-693-3921</phone>
64   <email>michel@unicode.org</email>
65   <uri>http://www.suignard.com</uri>
66   </address>
67</author>
68<author initials="L." surname="Masinter" fullname="Larry Masinter">
69   <organization>Adobe</organization>
70   <address>
71   <postal>
72   <street>345 Park Ave</street>
73   <city>San Jose</city>
74   <region>CA</region>
75   <code>95110</code>
76   <country>U.S.A.</country>
77   </postal>
78   <phone>+1-408-536-3024</phone>
79   <email>masinter@adobe.com</email>
80   <uri>http://larry.masinter.net</uri>
81   </address>
82</author>
83
84<date year="2012" />
85<area>Applications</area>
86<workgroup>Internationalized Resource Identifiers (iri)</workgroup>
87<keyword>IRI</keyword>
88<keyword>Internationalized Resource Identifier</keyword>
89<keyword>UTF-8</keyword>
90<keyword>URI</keyword>
91<keyword>IDN</keyword>
92<keyword>LEIRI</keyword>
93
94<abstract>
95<t>This document defines the Internationalized Resource Identifier
96(IRI) protocol element, as an extension of the Uniform Resource
97Identifier (URI).  An IRI is a sequence of characters from the
98Universal Character Set (Unicode/ISO 10646). Grammar and processing
99rules are given for IRIs and related syntactic forms.</t>
100
101<t>Defining IRI as a new protocol element (rather than updating or
102extending the definition of URI) allows independent orderly
103transitions: protocols and languages that use URIs must
104explicitly choose to allow IRIs.</t>
105
106<t>Guidelines are provided for the use and deployment of IRIs and
107related protocol elements when revising protocols, formats, and
108software components that currently deal only with URIs.</t>
109
110<t>This document is part of a set of documents intended to
111replace RFC 3987.</t>
112
113</abstract>
114  <note title='RFC Editor: Please remove the next paragraph before publication.'>
115    <t>This (and several companion documents) are intended to obsolete RFC 3987,
116    and also move towards IETF Draft Standard.  For discussion and comments on these
117    drafts, please join the IETF IRI WG by subscribing to the mailing
118    list public-iri@w3.org, archives at http://lists.w3.org/archives/public/public-iri/.
119    For a list of open issues, please see
120    the issue tracker of the WG at http://trac.tools.ietf.org/wg/iri/trac/report/1.
121    For a list of individual edits, please see the change history at
122    http://trac.tools.ietf.org/wg/iri/trac/log/draft-ietf-iri-3987bis.</t>
123</note>
124</front>
125<middle>
126
127<section title="Introduction">
128
129<section title="Overview and Motivation" anchor="overview">
130
131<t>A Uniform Resource Identifier (URI) is defined in <xref
132target="RFC3986"/> as a sequence of characters chosen from a limited
133subset of the repertoire of US-ASCII <xref target="ASCII"/>
134characters.</t>
135
136<t>The characters in URIs are frequently used for representing words
137of natural languages.  This usage has many advantages: Such URIs are
138easier to memorize, easier to interpret, easier to transcribe, easier
139to create, and easier to guess. For most languages other than English,
140however, the natural script uses characters other than A - Z. For many
141people, handling Latin characters is as difficult as handling the
142characters of other scripts is for those who use only the Latin
143script. Many languages with non-Latin scripts are transcribed with
144Latin letters. These transcriptions are now often used in URIs, but
145they introduce additional difficulties.</t>
146
147<t>The infrastructure for the appropriate handling of characters from
148additional scripts is now widely deployed in operating system and
149application software. Software that can handle a wide variety of
150scripts and languages at the same time is increasingly common. Also,
151an increasing number of protocols and formats can carry a wide range of
152characters.</t>
153
154<t>URIs are composed out of a very limited repertoire of characters;
155this design choice was made to support global transcription (see <xref
156target="RFC3986"/> section 1.2.1.).  Reliable transition between a URI
157(as an abstract protocol element composed of a sequence of characters)
158and a presentation of that URI (written on a napkin, read out loud)
159and back is relatively straightforward, because of the limited
160repertoire of characters used.  IRIs are designed to satisfy a
161different set of use requirements; in particular, to allow IRIs to be
162written in ways that are more meaningful to their users, even at the
163expense of global transcribability. However, ensuring reliability of
164the transition between an IRI and its presentation and back is more
165difficult and complex when dealing with the larger set of Unicode
166characters.  For example, Unicode supports multiple ways of encoding
167complex combinations of characters and accents, with multiple
168character sequences that can result in the same presentation.</t>
169
170<t>This document defines the protocol element called Internationalized
171Resource Identifier (IRI), which allows applications of URIs to be
172extended to use resource identifiers that have a much wider repertoire
173of characters. It also provides corresponding "internationalized"
174versions of other constructs from <xref target="RFC3986"/>, such as
175URI references. The syntax of IRIs is defined in <xref
176target="syntax"/>.
177</t>
178
179<t>Within this document,
180               <xref target="IRIuse"/> discusses the use
181of IRIs in different situations.  <xref target="guidelines"/> gives
182additional informative guidelines.  <xref target="security"/>
183discusses IRI-specific security considerations.</t>
184
185<t>This specification is part of a collection of specifications
186intended to replace <xref target="RFC3987"/>.
187<xref target="Bidi"/> discusses the special case of
188bidirectional IRIs, IRIs using characters from scripts written
189right-to-left.
190<xref target="Equivalence"/> gives guidelines for applications wishing
191to determine if two IRIs are equivalent, as well as defining
192some equivalence methods.
193<xref target="RFC4395bis"/> updates the URI scheme registration
194guidelines and procedures to note that every URI scheme is also
195automatically an IRI scheme and to allow scheme definitions
196to be directly described in terms of Unicode characters.
197</t>
198
199</section> <!-- overview -->
200
201<section title="Applicability" anchor="Applicability">
202
203<t>IRIs are designed to allow protocols and software that deal with
204URIs to be updated to handle IRIs. Processing of
205IRIs is accomplished by extending the URI syntax while retaining (and
206not expanding) the set of "reserved" characters, such that the syntax
207for any URI scheme may be extended to allow non-ASCII
208characters. In addition, following parsing of an IRI, it is possible
209to construct a corresponding URI by first encoding characters outside
210of the allowed URI range and then reassembling the components.
211</t>
212
213<t>Practical use of IRIs forms in place of URIs forms depends on the
214following conditions being met:</t>
215
216<t><list style="hanging">
217   
218<t hangText="a.">A protocol or format element MUST be explicitly designated to be
219  able to carry IRIs. The intent is to avoid introducing IRIs into
220  contexts that are not defined to accept them.  For example, XML
221  schema <xref target="XMLSchema"/> has an explicit type "anyURI" that
222  includes IRIs and IRI references. Therefore, IRIs and IRI references
223  can be used in attributes and elements of type "anyURI".  On the other
224  hand, in HTTP/1.1 (<xref target="RFC2616"/>) , the
225  Request URI is defined as a URI, which means that direct use of IRIs
226  is not allowed in HTTP requests.</t>
227
228<t hangText="b.">The protocol or format carrying the IRIs MUST have a
229  mechanism to represent the wide range of characters used in IRIs,
230  either natively or by some protocol- or format-specific escaping
231  mechanism (for example, numeric character references in <xref
232  target="XML1"/>).</t>
233
234<t hangText="c.">The URI scheme definition, if it explicitly allows a
235  percent sign ("%") in any syntactic component, SHOULD define the
236  interpretation of sequences of percent-encoded octets (using "%XX"
237  hex octets) as octets from sequences of UTF-8 encoded characters; this
238  is recommended in the guidelines for registering new schemes, <xref
239  target="RFC4395bis"/>.  For example, this is the practice for IMAP URLs
240  <xref target="RFC2192"/>, POP URLs <xref target="RFC2384"/> and the
241  URN syntax <xref target="RFC2141"/>). Note that use of
242  percent-encoding may also be restricted in some situations, for
243  example, URI schemes that disallow percent-encoding might still be
244  used with a fragment identifier which is percent-encoded (e.g.,
245  <xref target="XPointer"/>). See <xref target="UTF8use"/> for further
246  discussion.</t>
247</list></t>
248
249</section> <!-- applicability -->
250
251<section title="Definitions" anchor="sec-Definitions">
252 
253<t>The following definitions are used in this document; they follow the
254terms in <xref target="RFC2130"/>, <xref target="RFC2277"/>, and
255<xref target="ISO10646"/>.</t>
256<t><list style="hanging">
257   
258<t hangText="character:">A member of a set of elements used for the
259    organization, control, or representation of data. For example,
260    "LATIN CAPITAL LETTER A" names a character.</t>
261   
262<t hangText="octet:">An ordered sequence of eight bits considered as a
263    unit.</t>
264   
265<t hangText="character repertoire:">A set of characters (set in the
266    mathematical sense).</t>
267   
268<t hangText="sequence of characters:">A sequence of characters (one
269    after another).</t>
270   
271<t hangText="sequence of octets:">A sequence of octets (one after
272    another).</t>
273   
274<t hangText="character encoding:">A method of representing a sequence
275    of characters as a sequence of octets (maybe with variants). Also,
276    a method of (unambiguously) converting a sequence of octets into a
277    sequence of characters.</t>
278   
279<t hangText="charset:">The name of a parameter or attribute used to
280    identify a character encoding.</t>
281   
282<t hangText="UCS:">Universal Character Set. The coded character set
283    defined by ISO/IEC 10646 <xref target="ISO10646"/> and the Unicode
284    Standard <xref target="UNIV6"/>.</t>
285   
286<t hangText="IRI reference:">Denotes the common usage of an
287    Internationalized Resource Identifier. An IRI reference may be
288    absolute or relative.  However, the "IRI" that results from such a
289    reference only includes absolute IRIs; any relative IRI references
290    are resolved to their absolute form.  Note that in <xref
291    target="RFC2396"/> URIs did not include fragment identifiers, but
292    in <xref target="RFC3986"/> fragment identifiers are part of
293    URIs.</t>
294   
295<t hangText="LEIRI (Legacy Extended IRI):">  This term is used in
296   various XML specifications to refer
297   to strings that, although not valid IRIs, are acceptable input to
298   the processing rules in <xref target="LEIRIspec" />.</t>
299
300<t hangText="running text:">Human text (paragraphs, sentences,
301   phrases) with syntax according to orthographic conventions of a
302   natural language, as opposed to syntax defined for ease of
303   processing by machines (e.g., markup, programming languages).</t>
304   
305<t hangText="protocol element:">Any portion of a message that affects
306    processing of that message by the protocol in question.</t>
307   
308<t hangText="create (a URI or IRI):">With respect to URIs and IRIs,
309     the term is used for the initial creation. This may be the
310     initial creation of a resource with a certain identifier, or the
311     initial exposition of a resource under a particular
312     identifier.</t>
313   
314<t hangText="generate (a URI or IRI):">With respect to URIs and IRIs,
315     the term is used when the identifier is generated by derivation
316     from other information.</t>
317
318<t hangText="parsed URI component:">When a URI processor parses a URI
319   (following the generic syntax or a scheme-specific syntax, the result
320   is a set of parsed URI components, each of which has a type
321   (corresponding to the syntactic definition) and a sequence of URI
322   characters.  </t>
323
324<t hangText="parsed IRI component:">When an IRI processor parses
325   an IRI directly, following the general syntax or a scheme-specific
326   syntax, the result is a set of parsed IRI components, each of
327   which has a type (corresponding to the syntactic definition)
328   and a sequence of IRI characters. (This definition is analogous
329   to "parsed URI component".)</t>
330
331<t hangText="IRI scheme:">A URI scheme may also be known as
332   an "IRI scheme" if the scheme's syntax has been extended to
333   allow non-US-ASCII characters according to the rules in this
334   document.</t>
335
336</list></t>
337</section> <!-- definitions -->
338<section title="Notation" anchor="sec-Notation">
339     
340<t>RFCs and Internet Drafts currently do not allow any characters
341outside the US-ASCII repertoire. Therefore, this document uses various
342special notations for such characters in examples.</t>
343     
344<t>In text, characters outside US-ASCII are sometimes referenced by
345using a prefix of 'U+', followed by four to six hexadecimal
346digits.</t>
347
348  <t>To represent characters outside US-ASCII in a document format
349    that is limited to US-ASCII, this document
350    uses 'XML Notation'.
351    XML Notation uses a leading '&amp;#x', a trailing ';', and the
352hexadecimal number of the character in the UCS in between. For
353example, &amp;#x42F; stands for CYRILLIC CAPITAL LETTER YA<ionly> (Я)</ionly>.
354In this notation, an actual '&amp;' is denoted by '&amp;amp;'.
355This notation is only used in the ASCII version(s) of this document,
356because in the other versions, non-ASCII characters are used directly.</t>
357
358<t>To denote actual octets in examples (as opposed to percent-encoded
359octets), the two hex digits denoting the octet are enclosed in "&lt;"
360and "&gt;".  For example, the octet often denoted as 0xc9 is denoted
361here as &lt;c9&gt;.</t>
362
363<t> In this document, the key words "MUST", "MUST NOT", "REQUIRED",
364"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
365and "OPTIONAL" are to be interpreted as described in <xref
366target="RFC2119"/>.</t>
367
368</section> <!-- notation -->
369</section> <!-- introduction -->
370
371<section title="IRI Syntax" anchor="syntax">
372<t>This section defines the syntax of Internationalized Resource
373Identifiers (IRIs).</t>
374
375<t>As with URIs, an IRI is defined as a sequence of characters, not as
376a sequence of octets.
377This definition accommodates the fact that IRIs
378may be written on paper or read over the radio as well as stored or
379transmitted digitally.  The same IRI might be represented as different
380sequences of octets in different protocols or documents if these
381protocols or documents use different character encodings (and/or
382transfer encodings).  Using the same character encoding as the
383containing protocol or document ensures that the characters in the IRI
384can be handled (e.g., searched, converted, displayed) in the same way
385as the rest of the protocol or document.</t>
386
387<section title="Summary of IRI Syntax" anchor="summary">
388
389<t>The IRI syntax extends the URI syntax in <xref
390target="RFC3986"/> by extending the class of unreserved characters,
391primarily by adding the characters of the UCS (Universal Character Set, <xref
392target="ISO10646"/>) beyond U+007F, subject to the limitations given
393in the syntax rules below and in <xref target="limitations"/>.</t>
394
395<t>The syntax and use of components and reserved characters is the
396same as that in <xref target="RFC3986"/>. Each URI scheme thus also
397functions as an IRI scheme, in that scheme-specific parsing rules
398for URIs of a scheme are extended to allow parsing of IRIs using
399the same parsing rules.</t>
400
401<t>All the operations defined in <xref target="RFC3986"/>, such as the
402resolution of relative references, can be applied to IRIs by
403IRI-processing software in exactly the same way as they are for URIs
404by URI-processing software.</t>
405
406<t>Characters outside the US-ASCII repertoire MUST NOT be reserved and
407therefore MUST NOT be used for syntactical purposes, such as to
408delimit components in newly defined schemes. For example, U+00A2, CENT
409SIGN, is not allowed as a delimiter in IRIs, because it is in the
410'iunreserved' category. This is similar to the fact that it is not
411possible to use '-' as a delimiter in URIs, because it is in the
412'unreserved' category.</t>
413
414</section> <!-- summary -->
415<section title="ABNF for IRI References and IRIs" anchor="abnf">
416
417<t>An ABNF definition for IRI references (which are the most general
418concept and the start of the grammar) and IRIs is given here. The
419syntax of this ABNF is described in <xref target="STD68"/>. Character
420numbers are taken from the UCS, without implying any actual binary
421encoding. Terminals in the ABNF are characters, not octets.</t>
422
423<t>The following grammar closely follows the URI grammar in <xref
424target="RFC3986"/>, except that the range of unreserved characters is
425expanded to include UCS characters, with the restriction that private
426UCS characters can occur only in query parts. The grammar is split
427into two parts: Rules that differ from <xref target="RFC3986"/>
428because of the above-mentioned expansion, and rules that are the same
429as those in <xref target="RFC3986"/>. For rules that are different
430than those in <xref target="RFC3986"/>, the names of the non-terminals
431have been changed as follows. If the non-terminal contains 'URI', this
432has been changed to 'IRI'. Otherwise, an 'i' has been prefixed.
433The rule &lt;pct-form> has been introduced in order to be able to reference it from other parts of
434the document.</t>
435
436<!--
437for line length measuring in artwork (max 72 chars, three chars at start):
438      1         2         3         4         5         6         7
439456789012345678901234567890123456789012345678901234567890123456789012
440-->
441<figure>
442<preamble>The following rules are different from those in <xref target="RFC3986"/>:</preamble>
443<artwork>
444IRI            = scheme ":" ihier-part [ "?" iquery ]
445                 [ "#" ifragment ]
446
447ihier-part     = "//" iauthority ipath-abempty
448               / ipath-absolute
449               / ipath-rootless
450               / ipath-empty
451
452IRI-reference  = IRI / irelative-ref
453
454absolute-IRI   = scheme ":" ihier-part [ "?" iquery ]
455
456irelative-ref  = irelative-part [ "?" iquery ] [ "#" ifragment ]
457
458irelative-part = "//" iauthority ipath-abempty
459               / ipath-absolute
460               / ipath-noscheme
461               / ipath-empty
462
463iauthority     = [ iuserinfo "@" ] ihost [ ":" port ]
464iuserinfo      = *( iunreserved / pct-form / sub-delims / ":" )
465ihost          = IP-literal / IPv4address / ireg-name
466
467pct-form       = pct-encoded
468
469ireg-name      = *( iunreserved / sub-delims )
470
471ipath          = ipath-abempty   ; begins with "/" or is empty
472               / ipath-absolute  ; begins with "/" but not "//"
473               / ipath-noscheme  ; begins with a non-colon segment
474               / ipath-rootless  ; begins with a segment
475               / ipath-empty     ; zero characters
476
477ipath-abempty  = *( path-sep isegment )
478ipath-absolute = path-sep [ isegment-nz *( path-sep isegment ) ]
479ipath-noscheme = isegment-nz-nc *( path-sep isegment )
480ipath-rootless = isegment-nz *( path-sep isegment )
481ipath-empty    = ""
482path-sep       = "/"
483
484isegment       = *ipchar
485isegment-nz    = 1*ipchar
486isegment-nz-nc = 1*( iunreserved / pct-form / sub-delims
487                     / "@" )
488               ; non-zero-length segment without any colon ":"
489
490ipchar         = iunreserved / pct-form / sub-delims / ":"
491               / "@"
492 
493iquery         = *( ipchar / iprivate / "/" / "?" )
494
495ifragment      = *( ipchar / "/" / "?" )
496
497iunreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~" / ucschar
498
499ucschar        = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
500               / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
501               / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
502               / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
503               / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
504               / %xD0000-DFFFD / %xE1000-EFFFD
505
506iprivate       = %xE000-F8FF / %xE0000-E0FFF / %xF0000-FFFFD
507               / %x100000-10FFFD
508</artwork>
509</figure>
510
511<t>Some productions are ambiguous. The "first-match-wins" (a.k.a. "greedy")
512algorithm applies. For details, see <xref target="RFC3986"/>.</t>
513
514<figure>
515<preamble>The following rules are the same as those in <xref target="RFC3986"/>:</preamble>
516<artwork>
517scheme         = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
518 
519port           = *DIGIT
520 
521IP-literal     = "[" ( IPv6address / IPvFuture  ) "]"
522 
523IPvFuture      = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
524 
525IPv6address    =                            6( h16 ":" ) ls32
526               /                       "::" 5( h16 ":" ) ls32
527               / [               h16 ] "::" 4( h16 ":" ) ls32
528               / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
529               / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
530               / [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
531               / [ *4( h16 ":" ) h16 ] "::"              ls32
532               / [ *5( h16 ":" ) h16 ] "::"              h16
533               / [ *6( h16 ":" ) h16 ] "::"
534               
535h16            = 1*4HEXDIG
536ls32           = ( h16 ":" h16 ) / IPv4address
537
538IPv4address    = dec-octet "." dec-octet "." dec-octet "." dec-octet
539
540dec-octet      = DIGIT                 ; 0-9
541               / %x31-39 DIGIT         ; 10-99
542               / "1" 2DIGIT            ; 100-199
543               / "2" %x30-34 DIGIT     ; 200-249
544               / "25" %x30-35          ; 250-255
545           
546pct-encoded    = "%" HEXDIG HEXDIG
547
548unreserved     = ALPHA / DIGIT / "-" / "." / "_" / "~"
549reserved       = gen-delims / sub-delims
550gen-delims     = ":" / "/" / "?" / "#" / "[" / "]" / "@"
551sub-delims     = "!" / "$" / "&amp;" / "'" / "(" / ")"
552               / "*" / "+" / "," / ";" / "="
553</artwork></figure>
554
555<t>This syntax does not support IPv6 scoped addressing zone identifiers.</t>
556
557</section> <!-- abnf -->
558
559</section> <!-- syntax -->
560
561<section title="Processing IRIs and related protocol elements" anchor="processing">
562
563<t>IRIs are meant to replace URIs in identifying resources within new
564versions of protocols, formats, and software components that use a
565UCS-based character repertoire.  Protocols and components may use and
566process IRIs directly. However, there are still numerous systems and
567protocols which only accept URIs or components of parsed URIs; that is,
568they only accept sequences of characters within the subset of US-ASCII
569characters allowed in URIs. </t>
570
571<t>This section defines specific processing steps for IRI consumers
572which establish the relationship between the string given and the
573interpreted derivatives. These
574processing steps apply to both IRIs and IRI references (i.e., absolute
575or relative forms); for IRIs, some steps are scheme specific. </t>
576
577<section title="Converting to UCS" anchor="ucsconv"> 
578 
579<t>Input that is already in a Unicode form (i.e., a sequence of Unicode
580 characters or an octet-stream representing a Unicode-based character
581 encoding such as UTF-8 or UTF-16) should be left as is and not
582 normalized or changed.</t>
583
584  <t>An IRI or IRI reference is a sequence of characters from the UCS.
585    For input from presentations (written on paper, read aloud)
586    or translation from other representations (a text stream using a legacy character
587    encoding), convert the input to Unicode.
588    Note that some character encodings or transcriptions can be converted
589    to or represented by more than one sequence of Unicode characters.
590
591    Ideally the resulting IRI would use a normalized form,
592    such as Unicode Normalization Form C <xref target="UTR15"/>,
593    since that ensures a stable, consistent representation
594    that is most likely to produce the intended results.
595    Previous versions of this specification required
596    normalization at this step. However, attempts to
597    require normalization in other protocols have met with
598    strong enough resistance that requiring normalization
599    here was considered impractical.
600    Implementers and users are cautioned that, while denormalized character sequences are valid,
601    they might be difficult for other users or processes to reproduce
602    and might lead to unexpected results.
603  <!-- raise on list:
604    It is recommended
605    that the processing of IRI components treat
606    strings with the same normalized forms as equivalent.
607   -->
608  </t>
609
610</section> <!-- ucsconv -->
611
612<section title="Parse the IRI into IRI components">
613
614<t>Parse the IRI, either as a relative reference (no scheme)
615or using scheme specific processing (according to the scheme
616given); the result is a set of parsed IRI components.</t>
617
618</section> <!-- parse -->
619
620<section title="General percent-encoding of IRI components" anchor="compmapping">
621   
622<t>Except as noted in the following subsections, IRI components are mapped
623to the equivalent URI components by percent-encoding those characters
624not allowed in URIs. Previous processing steps will have removed
625some characters, and the interpretation of reserved characters will
626have already been done (with the syntactic reserved characters outside
627of the IRI component). This mapping is defined for all sequences
628of Unicode characters, whether or not they are valid for the component
629in question. </t>
630   
631<t>For each character which is not allowed anywhere in a valid URI
632 apply the following steps. </t>
633<t><list style="hanging">
634
635<t hangText="Convert to UTF-8:">Convert the character to a sequence of
636  one or more octets using UTF-8 <xref target="STD63"/>.</t>
637
638<t hangText="Percent encode:">Convert each octet of this sequence to %HH,
639   where HH is the hexadecimal notation of the octet value. The
640   hexadecimal notation SHOULD use uppercase letters. (This is the
641   general URI percent-encoding mechanism in Section 2.1 of <xref
642   target="RFC3986"/>.)</t>
643   
644</list></t>
645
646<t>Note that the mapping is an identity transformation for parsed URI
647components of valid URIs, and is idempotent: applying the mapping a
648second time will not change anything.</t>
649</section> <!-- general conversion -->
650
651<section title="Mapping ireg-name" anchor="dnsmapping">
652  <t>The mapping from &lt;ireg-name> to a &lt;reg-name> requires a choice
653    between one of the two methods described below.</t>
654  <section title='Mapping using Percent-Encoding' anchor='dnspercent'>
655  <t>The ireg-name component SHOULD be converted
656    according to the general procedure for percent-encoding
657    of IRI components described in <xref target="compmapping"/>.</t>
658 
659  <t>For example, the IRI
660    <vspace/>"http://r&amp;#xE9;sum&amp;#xE9;.example.org"<vspace/> will be
661    converted to <vspace/>"http://r%C3%A9sum%C3%A9.example.org".</t>
662
663  <t>This conversion for ireg-name is in line with Section 3.2.2
664    of <xref target="RFC3986"/>, which does not mandate
665    a particular registered name lookup technology. For further background,
666    see <xref target="RFC6055"/> and <xref target="Gettys"/>.</t>
667</section> <!-- dnspercent -->
668<section title="Mapping using Punycode" anchor='dnspunycode'>
669  <t>In situations where it is certain that &lt;ireg-name> is intended
670    to be used as a domain name to be processed by Domain Name Lookup
671    (as per <xref target="RFC5891"/>), an alternative method MAY be
672    used, converting &lt;ireg-name> as follows:</t>
673
674  <t>If there are any sequences of &lt;pct-encoded&gt;, and their
675    corresponding octets all represent valid UTF-8
676    octet sequences, then convert these back to Unicode
677    character sequences. (If any &lt;pct-encoded&gt; sequences are not
678    valid UTF-8 octet sequences, then leave the entire field as is
679    without any change, since punycode encoding would not succeed.)</t>
680
681<t>Replace the ireg-name part of the IRI by the part converted using
682the Domain Name Lookup procedure (Subsections 5.3 to 5.5) of <xref target="RFC5891"/>.
683  on each dot-separated label, and by using U+002E
684(FULL STOP) as a label separator.
685This procedure may fail, but this would mean that the IRI cannot be resolved.
686In such cases, if the domain name conversion fails, then the
687entire IRI conversion fails. Processors that have no mechanism for
688signalling a failure MAY instead substitute an otherwise
689invalid host name, although such processing SHOULD be avoided.</t>
690
691<t>For example, the IRI
692<vspace/>"http://r&amp;#xE9;sum&amp;#xE9;.example.org"<vspace/> is
693converted to <vspace/>"http://xn--rsum-bad.example.org".</t>
694  <t>This conversion for ireg-name will be better able to deal with legacy
695    infrastructure that cannot handle percent-encoding in domain names.</t>
696</section> <!-- punicode -->
697  <section title="Additional Considerations">
698
699<t><list style="hanging"> 
700<t hangText="Note:">Domain Names may appear in parts of an IRI other
701than the ireg-name part.  It is the responsibility of scheme-specific
702implementations (if the Internationalized Domain Name is part of the
703scheme syntax) or of server-side implementations (if the
704Internationalized Domain Name is part of 'iquery') to apply the
705necessary conversions at the appropriate point. Example: Trying to
706validate the Web page at<vspace/>
707http://r&amp;#xE9;sum&amp;#xE9;.example.org would lead to an IRI of
708<vspace/>http://validator.w3.org/check?uri=http%3A%2F%2Fr&amp;#xE9;sum&amp;#xE9;.<vspace/>example.org,
709which would convert to a URI
710of<vspace/>http://validator.w3.org/check?uri=http%3A%2F%2Fr%C3%A9sum%C3%A9.<vspace/>example.org.
711The server-side implementation is responsible for making the
712necessary conversions to be able to retrieve the Web page.</t>
713
714<t hangText="Note:">In this process, characters allowed in URI
715references and existing percent-encoded sequences are not encoded further.
716(This mapping is similar to, but different from, the encoding applied
717when arbitrary content is included in some part of a URI.)
718
719For example, an IRI of
720<vspace/>"http://www.example.org/red%09ros&amp;#xE9;#red"
721(in XML notation) is converted to
722<vspace/>"http://www.example.org/red%09ros%C3%A9#red", not to
723something like
724<vspace/>"http%3A%2F%2Fwww.example.org%2Fred%2509ros%C3%A9%23red".</t>
725
726</list></t>
727</section> <!-- additional -->
728</section> <!-- dnsmapping -->
729
730<section title="Mapping query components" anchor="querymapping">
731
732<t>For compatibility with existing deployed HTTP infrastructure,
733the following special case applies for schemes "http" and "https"
734and IRIs whose origin has a document charset other than one which
735is UCS-based (e.g., UTF-8 or UTF-16). In such a case, the "query"
736component of an IRI is mapped into a URI by using the document
737charset rather than UTF-8 as the binary representation before
738pct-encoding. This mapping is not applied for any other scheme
739or component.</t>
740
741</section> <!-- querymapping -->
742
743<section title="Mapping IRIs to URIs" anchor="mapping">
744
745<t>The mapping from an IRI to URI is accomplished by applying the
746mapping above (from IRI to URI components) and then reassembling a URI
747from the parsed URI components using the original punctuation that
748delimited the IRI components. </t>
749
750</section> <!-- mapping -->
751</section> <!-- processing -->
752
753<section title="Converting URIs to IRIs" anchor="URItoIRI">
754
755  <t>In some situations, for presentation and further processing,
756it is desirable to convert a URI into an equivalent IRI
757without unnecessary percent encoding.
758Of course, every URI is already an IRI in its own right without any
759conversion. This section gives one possible procedure for URI to IRI mapping.</t>
760
761<t>
762The conversion described in this section, if given a valid URI, will
763result in an IRI that maps back to the URI used as an input for the
764conversion (except for potential case differences in percent-encoding
765and for potential percent-encoded unreserved characters).
766
767However, the IRI resulting from this conversion may differ
768from the original IRI (if there ever was one).</t> 
769
770<t>URI-to-IRI conversion removes percent-encodings, but not all
771percent-encodings can be eliminated. There are several reasons for
772this:</t>
773
774<t><list style="hanging">
775
776<t hangText="1.">Some percent-encodings are necessary to distinguish
777    percent-encoded and unencoded uses of reserved characters.</t>
778
779<t hangText="2.">Some percent-encodings cannot be interpreted as sequences
780    of UTF-8 octets.<vspace blankLines="1"/>
781    (Note: The octet patterns of UTF-8 are highly regular.
782    Therefore, there is a very high probability, but no guarantee,
783    that percent-encodings that can be interpreted as sequences of UTF-8
784    octets actually originated from UTF-8. For a detailed discussion,
785    see <xref target="Duerst97"/>.)</t>
786
787<t hangText="3.">The conversion may result in a character that is not
788    appropriate in an IRI. See <xref target="abnf"/>,
789      and <xref target="limitations"/> for further details.</t>
790
791<t hangText="4.">IRI to URI conversion has different rules for
792    dealing with domain names and query parameters.</t>
793
794</list></t>
795
796<t>Conversion from a URI to an IRI MAY be done by using the following
797steps:
798
799<list style="hanging">
800<t hangText="1.">Represent the URI as a sequence of octets in
801       US-ASCII.</t>
802
803<t hangText="2.">Convert all percent-encodings ("%" followed by two
804      hexadecimal digits) to the corresponding octets, except those
805      corresponding to "%", characters in "reserved", and characters
806      in US-ASCII not allowed in URIs.</t> 
807
808<t hangText="3.">Re-percent-encode any octet produced in step 2 that
809      is not part of a strictly legal UTF-8 octet sequence.</t>
810
811
812<t hangText="4.">Re-percent-encode all octets produced in step 3 that
813      in UTF-8 represent characters that are not appropriate according
814      to <xref target="abnf"/>  and <xref
815      target="limitations"/>.</t> 
816
817<t hangText="5.">Interpret the resulting octet sequence as a sequence
818      of characters encoded in UTF-8.</t>
819
820<t hangText="6.">URIs known to contain domain names in the reg-name
821      component SHOULD convert punycode-encoded domain name labels to
822      the corresponding characters using the ToUnicode procedure. </t>
823</list></t>
824
825<t>This procedure will convert as many percent-encoded characters as
826possible to characters in an IRI. Because there are some choices when
827step 4 is applied (see <xref target="limitations"/>), results may
828vary.</t>
829
830<t>Conversions from URIs to IRIs MUST NOT use any character
831encoding other than UTF-8 in steps 3 and 4, even if it might be
832possible to guess from the context that another character encoding
833than UTF-8 was used in the URI.  For example, the URI
834"http://www.example.org/r%E9sum%E9.html" might with some guessing be
835interpreted to contain two e-acute characters encoded as
836iso-8859-1. It must not be converted to an IRI containing these
837e-acute characters. Otherwise, in the future the IRI will be mapped to
838"http://www.example.org/r%C3%A9sum%C3%A9.html", which is a different
839URI from "http://www.example.org/r%E9sum%E9.html".</t>
840
841<section title="Examples">
842
843<t>This section shows various examples of converting URIs to IRIs.
844Each example shows the result after each of the steps 1 through 6 is
845applied. XML Notation is used for the final result.  Octets are
846denoted by "&lt;" followed by two hexadecimal digits followed by
847"&gt;".</t>
848
849<t>The following example contains the sequence "%C3%BC", which is a
850strictly legal UTF-8 sequence, and which is converted into the actual
851character U+00FC, LATIN SMALL LETTER U WITH DIAERESIS (also known as
852u-umlaut).
853
854<list style="hanging">
855<t hangText="1.">http://www.example.org/D%C3%BCrst</t>
856<t hangText="2.">http://www.example.org/D&lt;c3&gt;&lt;bc&gt;rst</t>
857<t hangText="3.">http://www.example.org/D&lt;c3&gt;&lt;bc&gt;rst</t>
858<t hangText="4.">http://www.example.org/D&lt;c3&gt;&lt;bc&gt;rst</t>
859<t hangText="5.">http://www.example.org/D&amp;#xFC;rst</t>
860<t hangText="6.">http://www.example.org/D&amp;#xFC;rst</t>
861</list>
862</t>
863
864<t>The following example contains the sequence "%FC", which might
865represent U+00FC, LATIN SMALL LETTER U WITH DIAERESIS, in
866the<vspace/>iso-8859-1 character encoding.  (It might represent other
867characters in other character encodings. For example, the octet
868&lt;fc&gt; in iso-8859-5 represents U+045C, CYRILLIC SMALL LETTER
869KJE.)  Because &lt;fc&gt; is not part of a strictly legal UTF-8
870sequence, it is re-percent-encoded in step 3.
871
872
873<list style="hanging">
874<t hangText="1.">http://www.example.org/D%FCrst</t>
875<t hangText="2.">http://www.example.org/D&lt;fc&gt;rst</t>
876<t hangText="3.">http://www.example.org/D%FCrst</t>
877<t hangText="4.">http://www.example.org/D%FCrst</t>
878<t hangText="5.">http://www.example.org/D%FCrst</t>
879<t hangText="6.">http://www.example.org/D%FCrst</t>
880</list>
881</t>
882
883<t>The following example contains "%e2%80%ae", which is the percent-encoded<vspace/>UTF-8
884character encoding of U+202E, RIGHT-TO-LEFT OVERRIDE.
885The direct use of this character is forbiddin in an IRI. Therefore, the
886corresponding octets are re-percent-encoded in step 4. This example shows
887that the case (upper- or lowercase) of letters used in percent-encodings may not be preserved.
888The example also contains a punycode-encoded domain name label (xn--99zt52a),
889which is not converted.
890
891<list style="hanging">
892<t hangText="1.">http://xn--99zt52a.example.org/%e2%80%ae</t>
893<t hangText="2.">http://xn--99zt52a.example.org/&lt;e2&gt;&lt;80&gt;&lt;ae&gt;</t>
894<t hangText="3.">http://xn--99zt52a.example.org/&lt;e2&gt;&lt;80&gt;&lt;ae&gt;</t>
895<t hangText="4.">http://xn--99zt52a.example.org/%E2%80%AE</t>
896<t hangText="5.">http://xn--99zt52a.example.org/%E2%80%AE</t>
897<t hangText="6.">http://&amp;#x7D0D;&amp;#x8C46;.example.org/%E2%80%AE</t>
898</list></t>
899
900<t>Note that the label "xn--99zt52a" is converted to U+7D0D U+8C46
901(Japanese Natto). ((EDITOR NOTE: There is some inconsistency in this note.))</t>
902
903</section> <!-- examples -->
904</section> <!-- URItoIRI -->
905
906
907<section title="Use of IRIs" anchor="IRIuse">
908
909<section title="Limitations on UCS Characters Allowed in IRIs" anchor="limitations">
910
911<t>This section discusses limitations on characters and character
912sequences usable for IRIs beyond those given in <xref target="abnf"/>.
913The considerations in this section are
914relevant when IRIs are created and when URIs are converted to
915IRIs.</t>
916
917<t>
918
919<list style="hanging"><t hangText="a.">The repertoire of characters allowed
920    in each IRI component is limited by the definition of that component.
921    For example, the definition of the scheme component does not allow
922    characters beyond US-ASCII.
923    <vspace blankLines="1"/>
924    (Note: In accordance with URI practice, generic IRI
925    software cannot and should not check for such limitations.)</t>
926
927<t hangText="b.">The UCS contains many areas of characters for which
928    there are strong visual look-alikes. Because of the likelihood of
929    transcription errors, these also should be avoided. This includes
930    the full-width equivalents of Latin characters, half-width
931    Katakana characters for Japanese, and many others. It also
932    includes many look-alikes of "space", "delims", and "unwise",
933    characters excluded in <xref target="RFC3491"/>.</t>
934 
935<t hangText="c.">At the start of a component, the use of combining marks is strongly discouraged. As
936    an example, a COMBINING TILDE OVERLAY (U+0334) would be very confusing at the start of
937    a &lt;isegment>. Combined with the preceeding '/', it might look like a solidus
938    with combining tilde overlay, but IRI processing software will parse and process the
939    '/' separately.</t>
940<t hangText='d.'>The ZERO WIDTH NON-JOINER (U+200C) and ZERO WIDTH
941    JOINER (U+200D) are invisible in most contexts, but are crucial in
942    some very limited contexts. Appendix A of <xref target="RFC5892"/>
943    contains contextual restrictions for these and some other characters.
944    The use of these characters are strongly discouraged except
945    in the relevant contexts.</t>
946</list>
947</t>
948
949<t>Additional information is available from <xref target="UNIXML"/>.
950    <xref target="UNIXML"/> is written in the context of running text
951    rather than in that of identifiers. Nevertheless, it discusses
952    many of the categories of characters not appropriate for IRIs.</t>
953</section> <!-- limitations -->
954
955<section title="Software Interfaces and Protocols">
956
957<t>Although an IRI is defined as a sequence of characters, software
958interfaces for URIs typically function on sequences of octets or other
959kinds of code units. Thus, software interfaces and protocols MUST
960define which character encoding is used.</t>
961
962<t>Intermediate software interfaces between IRI-capable components and
963URI-only components MUST map the IRIs per <xref target="mapping"/>,
964when transferring from IRI-capable to URI-only components.
965
966This mapping SHOULD be applied as late as possible. It SHOULD NOT be
967applied between components that are known to be able to handle IRIs.</t>
968</section> <!-- software -->
969
970<section title="Format of URIs and IRIs in Documents and Protocols">
971
972<t>Document formats that transport URIs may have to be upgraded to allow
973the transport of IRIs. In cases where the document as a whole
974has a native character encoding, IRIs MUST also be encoded in this
975character encoding and converted accordingly by a parser or interpreter.
976
977IRI characters not expressible in the native character encoding SHOULD
978be escaped by using the escaping conventions of the document format if
979such conventions are available. Alternatively, they MAY be
980percent-encoded according to <xref target="mapping"/>. For example, in
981HTML or XML, numeric character references SHOULD be used. If a
982document as a whole has a native character encoding and that character
983encoding is not UTF-8, then IRIs MUST NOT be placed into the document
984in the UTF-8 character encoding.</t>
985
986<t>((UPDATE THIS NOTE)) Note: Some formats already accommodate IRIs,
987although they use different terminology. HTML 4.0 <xref
988target="HTML4"/> defines the conversion from IRIs to URIs as
989error-avoiding behavior. XML 1.0 <xref target="XML1"/>, XLink <xref
990target="XLink"/>, XML Schema <xref target="XMLSchema"/>, and
991specifications based upon them allow IRIs. Also, it is expected that
992all relevant new W3C formats and protocols will be required to handle
993IRIs <xref target="CharMod"/>.</t>
994
995</section> <!-- format -->
996
997<section title="Use of UTF-8 for Encoding Original Characters" anchor="UTF8use">
998
999<t>This section discusses details and gives examples for point c) in
1000<xref target="Applicability"/>. To be able to use IRIs, the URI
1001corresponding to the IRI in question has to encode original characters
1002into octets by using UTF-8.  This can be specified for all URIs of a
1003URI scheme or can apply to individual URIs for schemes that do not
1004specify how to encode original characters.  It can apply to the whole
1005URI, or only to some part. For background information on encoding
1006characters into URIs, see also Section 2.5 of <xref
1007target="RFC3986"/>.</t>
1008
1009<t>For new URI schemes, using UTF-8 is recommended in <xref
1010target="RFC4395bis"/>.  Examples where UTF-8 is already used are the URN
1011syntax <xref target="RFC2141"/>, IMAP URLs <xref target="RFC2192"/>,
1012POP URLs <xref target="RFC2384"/>, XMPP URLs <xref target='RFC5122'/>,
1013and the 'mailto:' scheme <xref target='RFC6068'/>. On the other hand, because the
1014HTTP URI scheme does not specify how to encode original characters,
1015only some HTTP URLs can have corresponding but different IRIs.</t>
1016
1017<t>For example, for a document with a URI
1018of<vspace/>"http://www.example.org/r%C3%A9sum%C3%A9.html", it is
1019possible to construct a corresponding IRI (in XML notation, see <xref
1020target="sec-Notation"/>):
1021"http://www.example.org/r&amp;#xE9;sum&amp;#xE9;.html" ("&amp;#xE9;"
1022stands for the e-acute character, and "%C3%A9" is the UTF-8 encoded
1023and percent-encoded representation of that character). On the other
1024hand, for a document with a URI of
1025"http://www.example.org/r%E9sum%E9.html", the percent-encoded octets
1026cannot be converted to actual characters in an IRI, as the
1027percent-encoding is not based on UTF-8.</t>
1028
1029<t>For most URI schemes, there is no need to upgrade their scheme
1030definition in order for them to work with IRIs.  The main case where
1031upgrading makes sense is when a scheme definition, or a particular
1032component of a scheme, is strictly limited to the use of US-ASCII
1033characters with no provision to include non-ASCII characters/octets
1034via percent-encoding, or if a scheme definition currently uses highly
1035scheme-specific provisions for the encoding of non-ASCII characters.</t>
1036
1037<t>This specification updates the IANA registry of URI schemes to note
1038their applicability to IRIs, see <xref target="iana"/>.  All IRIs use
1039URI schemes, and all URIs with URI schemes can be used as IRIs, even
1040though in some cases only by using URIs directly as IRIs, without any
1041conversion.</t>
1042
1043<t>Scheme definitions can impose restrictions on the syntax of
1044scheme-specific URIs; i.e., URIs that are admissible under the generic
1045URI syntax <xref target="RFC3986"/> may not be admissible due to
1046narrower syntactic constraints imposed by a URI scheme
1047specification. URI scheme definitions cannot broaden the syntactic
1048restrictions of the generic URI syntax; otherwise, it would be
1049possible to generate URIs that satisfied the scheme-specific syntactic
1050constraints without satisfying the syntactic constraints of the
1051generic URI syntax. However, additional syntactic constraints imposed
1052by URI scheme specifications are applicable to IRI, as the
1053corresponding URI resulting from the mapping defined in <xref
1054target="mapping"/> MUST be a valid URI under the syntactic
1055restrictions of generic URI syntax and any narrower restrictions
1056imposed by the corresponding URI scheme specification.</t>
1057
1058<t>The requirement for the use of UTF-8 generally applies to all parts
1059of a URI.  However, it is possible that the capability of IRIs to
1060represent a wide range of characters directly is used just in some
1061parts of the IRI (or IRI reference). The other parts of the IRI may
1062only contain US-ASCII characters, or they may not be based on
1063UTF-8. They may be based on another character encoding, or they may
1064directly encode raw binary data (see also <xref
1065target="RFC2397"/>). </t>
1066
1067<t>For example, it is possible to have a URI reference
1068of<vspace/>"http://www.example.org/r%E9sum%E9.xml#r%C3%A9sum%C3%A9",
1069where the document name is encoded in iso-8859-1 based on server
1070settings, but where the fragment identifier is encoded in UTF-8 according
1071to <xref target="XPointer"/>. The IRI corresponding to the above
1072URI would be (in XML notation)<vspace/>"http://www.example.org/r%E9sum%E9.xml#r&amp;#xE9;sum&amp;#xE9;".</t>
1073
1074<t>Similar considerations apply to query parts. The functionality
1075of IRIs (namely, to be able to include non-ASCII characters) can
1076only be used if the query part is encoded in UTF-8.</t>
1077
1078</section> <!-- utf8 -->
1079
1080<section title="Relative IRI References">
1081<t>Processing of relative IRI references against a base is handled
1082straightforwardly; the algorithms of <xref target="RFC3986"/> can
1083be applied directly, treating the characters additionally allowed
1084in IRI references in the same way that unreserved characters are treated in URI
1085references.</t>
1086
1087</section> <!-- relative -->
1088</section> <!-- IRIuse -->
1089
1090  <section title="Legacy Extended IRIs (LEIRIs)">
1091    <t>In some cases, there have been formats which have used a protocol element
1092      which is a variant of the IRI definition; these variants have usually been
1093      somewhat less restricted in syntax. This section provides
1094      a definition and a name (Legacy Extended IRI or LEIRI) for one of these
1095      variants used widely in XML-based protocols. This variant has to be used with care;
1096      it requires further processing before being fully interchangeable as IRIs.
1097
1098      New protocols and formats SHOULD NOT use Legacy Extended IRIs.
1099      Even where Legacy Extended IRIs are allowed, only IRIs fully conforming
1100      to the syntax definition in <xref target="abnf"></xref> SHOULD be created,
1101      generated, and used. The provisions in this section also apply to
1102      Legacy Extended IRI references.</t>
1103   
1104    <section title="Legacy Extended IRI Syntax">
1105      <figure>
1106
1107        <preamble>This section defines Legacy Extended IRIs (LEIRIs).  The syntax of
1108   Legacy Extended IRIs is the same as that for &lt;IRI-reference&gt;, except
1109   that the ucschar production is replaced by the leiri-ucschar
1110   production:
1111
1112</preamble>
1113        <artwork>
1114leiri-ucschar  = " " / "&lt;" / "&gt;" / '"' / "{" / "}" / "|"
1115               / "\" / "^" / "`" / %x0-1F / %x7F-D7FF
1116               / %xE000-FFFD / %x10000-10FFFF
1117        </artwork>
1118        <postamble>The restriction on bidirectional formatting characters in <xref target="Bidi"></xref> is lifted.
1119        The iprivate production becomes redundant.</postamble>
1120      </figure>
1121
1122      <t>Likewise, the syntax for Legacy Extended IRI references
1123      (LEIRI references) is the same as that for IRI references with
1124      the above replacement of ucschar with leiri-ucschar.</t>
1125
1126     </section>
1127    <section title="Conversion of Legacy Extended IRIs to IRIs" anchor="LEIRIspec">
1128      <t>To convert a Legacy Extended IRI (reference) to
1129      an IRI (reference), each character allowed in a Legacy Extended IRI (reference)
1130      but not allowed in an IRI (reference) (see <xref target="notAllowed"></xref>)  MUST be percent-encoded
1131      by applying the steps in <xref target="compmapping"></xref>.</t>
1132    </section>
1133     
1134    <section title="Characters Allowed in Legacy Extended IRIs but not in IRIs" anchor="notAllowed">
1135      <t>This section provides a list of the groups of characters and code points
1136        that are allowed in Legacy Extedend IRIs, but are not allowed in IRIs
1137        or are allowed in IRIs only in the query part. For each group of characters,
1138        advice on the usage of these characters is also given, concentrating on the
1139        reasons for why not to use them.</t>
1140      <t>
1141        <list>
1142          <t>Space (U+0020): Some formats and applications use space as a delimiter,
1143            e.g., for items in a list. Appendix C of <xref target="RFC3986"></xref>
1144            also mentions that white space may have to be added when displaying
1145            or printing long URIs; the same applies to long IRIs.
1146            Spaces might disappear, or a single Legacy Extended IRI
1147            might incorrectly be interpreted as two or more separate ones.</t>
1148     
1149          <t>Delimiters "&lt;" (U+003C), "&gt;" (U+003E), and '"' (U+0022):
1150            Appendix C of <xref target="RFC3986"></xref> suggests the use of
1151            double-quotes ("http://example.com/") and angle brackets
1152        (&lt;http://example.com/&gt;) as delimiters for URIs in plain text.
1153        These conventions are often used, and also apply to IRIs.
1154        Legacy Extended IRIs using these characters might be cut off at the wrong place.</t>
1155     
1156          <t>Unwise characters "\" (U+005C),
1157          "^" (U+005E), "`" (U+0060), "{" (U+007B), "|" (U+007C), and "}" (U+007D):
1158          These characters originally were excluded from URIs because
1159          the respective codepoints are assigned to different graphic characters
1160          in some 7-bit or 8-bit encoding. Despite the move to Unicode,
1161          some of these characters are still occasionally displayed differently
1162          on some systems, e.g., U+005C as a Japanese Yen symbol.
1163     
1164          Also, the fact that these characters are not used in URIs or IRIs
1165          has encouraged their use outside URIs or IRIs in contexts that may
1166          include URIs or IRIs. In case a Legacy Extended IRI with such a character
1167          is used in such a context, the Legacy Extended IRI will be interpreted piecemeal.</t>
1168     
1169          <t>The controls (C0 controls, DEL, and C1 controls, #x0  - #x1F  #x7F - #x9F):
1170            There is no way to transmit these characters reliably except potentially
1171            in electronic form. Even when in electronic form, some software components
1172            might silently filter out some of these characters,
1173            or may stop processing alltogether when encountering some of them.
1174            These characters may affect text display in subtle, unnoticable ways
1175            or in drastic, global, and irreversible ways depending
1176            on the hardware and software involved.
1177            The use of some of these characters may allow malicious users
1178            to manipulate the display of a Legacy Extended IRI and its context.</t>
1179          <t>Bidi formatting characters (U+200E, U+200F, U+202A-202E):
1180            These characters affect the display ordering of characters.
1181            Displayed Legacy Extended IRIs containing these characters
1182            cannot be converted back to electronic form (logical order) unambiguously.
1183            These characters may allow malicious users to manipulate
1184            the display of a Legacy Extended IRI and its context.</t>
1185          <t>Specials (U+FFF0-FFFD): These code points provide functionality
1186            beyond that useful in a Legacy Extended IRI, for example byte order identification,
1187            annotation, and replacements for unknown characters and objects.
1188            Their use and interpretation in a Legacy Extended IRI
1189            serves no purpose and may lead to confusing display variations.</t>
1190          <t>Private use code points (U+E000-F8FF, U+F0000-FFFFD, U+100000-10FFFD):
1191            Display and interpretation of these code points is by definition
1192            undefined without private agreement. Therefore, these code points
1193            are not suited for use on the Internet. They are not interoperable and may have
1194            unpredictable effects.</t>
1195          <t>Tags (U+E0000-E0FFF): These characters provide a way to language tag in Unicode plain text.
1196            They are not appropriate for Legacy Extended IRIs because language information
1197            in identifiers cannot reliably be input, transmitted
1198            (e.g., on a visual medium such as paper), or recognized.</t>
1199          <t>Non-characters (U+FDD0-FDEF, U+1FFFE-1FFFF, U+2FFFE-2FFFF, U+3FFFE-3FFFF,
1200            U+4FFFE-4FFFF, U+5FFFE-5FFFF, U+6FFFE-6FFFF, U+7FFFE-7FFFF, U+8FFFE-8FFFF,
1201            U+9FFFE-9FFFF, U+AFFFE-AFFFF, U+BFFFE-BFFFF, U+CFFFE-CFFFF, U+DFFFE-DFFFF,
1202            U+EFFFE-EFFFF, U+FFFFE-FFFFF, U+10FFFE-10FFFF):
1203            These code points are defined as non-characters. Applications may use
1204            some of them internally, but are not prepared to interchange them.</t>
1205        </list>
1206      </t>
1207      <t>For reference, we here also list the code points and code units
1208        not even allowed in Legacy Extended IRIs:
1209        <list>
1210         
1211          <t>Surrogate code units (D800-DFFF):
1212          These do not represent Unicode codepoints.</t>
1213           <t>Non-characters (U+FFFE-FFFF): These are not allowed in XML nor LEIRIs.</t>
1214     
1215        </list>
1216      </t>
1217    </section>
1218  </section>
1219 
1220<section title="URI/IRI Processing Guidelines (Informative)" anchor="guidelines">
1221
1222<t>This informative section provides guidelines for supporting IRIs in
1223the same software components and operations that currently process
1224URIs: Software interfaces that handle URIs, software that allows users
1225to enter URIs, software that creates or generates URIs, software that
1226displays URIs, formats and protocols that transport URIs, and software
1227that interprets URIs. These may all require modification before
1228functioning properly with IRIs. The considerations in this section
1229also apply to URI references and IRI references.</t>
1230
1231<section title="URI/IRI Software Interfaces">
1232<t>Software interfaces that handle URIs, such as URI-handling APIs and
1233protocols transferring URIs, need interfaces and protocol elements
1234that are designed to carry IRIs.</t>
1235
1236<t>In case the current handling in an API or protocol is based on
1237US-ASCII, UTF-8 is recommended as the character encoding for IRIs, as
1238it is compatible with US-ASCII, is in accordance with the
1239recommendations of <xref target="RFC2277"/>, and makes converting to
1240URIs easy. In any case, the API or protocol definition must clearly
1241define the character encoding to be used.</t>
1242
1243<t>The transfer from URI-only to IRI-capable components requires no
1244mapping, although the conversion described in <xref
1245target="URItoIRI"/> above may be performed. It is preferable not to
1246perform this inverse conversion unless it is certain this can be done
1247correctly.</t>
1248</section><!-- software interfaces -->
1249
1250<section title="URI/IRI Entry">
1251
1252<t>Some components allow users to enter URIs into the system
1253by typing or dictation, for example. This software must be updated to allow
1254for IRI entry.</t>
1255
1256<t>A person viewing a visual presentation of an IRI (as a sequence
1257of glyphs, in some order, in some visual display)
1258will use an entry method for characters in the user's language to
1259input the IRI. Depending on the script and the input method used, this
1260may be a more or less complicated process.</t>
1261
1262<t>The process of IRI entry must ensure, as much as possible, that the
1263restrictions defined in <xref target="abnf"/> are met. This may be
1264done by choosing appropriate input methods or variants/settings
1265thereof, by appropriately converting the characters being input, by
1266eliminating characters that cannot be converted, and/or by issuing a
1267warning or error message to the user.</t>
1268
1269<t>As an example of variant settings, input method editors for East
1270Asian Languages usually allow the input of Latin letters and related
1271characters in full-width or half-width versions. For IRI input, the
1272input method editor should be set so that it produces half-width Latin
1273letters and punctuation and full-width Katakana.</t>
1274
1275<t>An input field primarily or solely used for the input of URIs/IRIs
1276might allow the user to view an IRI as it is mapped to a URI.  Places
1277where the input of IRIs is frequent may provide the possibility for
1278viewing an IRI as mapped to a URI. This will help users when some of
1279the software they use does not yet accept IRIs.</t>
1280
1281<t>An IRI input component interfacing to components that handle URIs,
1282but not IRIs, must map the IRI to a URI before passing it to these
1283components.</t>
1284
1285<t>For the input of IRIs with right-to-left characters, please see
1286<xref target="Bidi"></xref>.</t>
1287</section><!-- entry -->
1288
1289<section title="URI/IRI Transfer between Applications">
1290
1291<t>Many applications (for example, mail user agents) try to detect
1292URIs appearing in plain text. For this, they use some heuristics based
1293on URI syntax. They then allow the user to click on such URIs and
1294retrieve the corresponding resource in an appropriate (usually
1295scheme-dependent) application.</t>
1296
1297<t>Such applications would need to be upgraded, in order to use the
1298IRI syntax as a base for heuristics. In particular, a non-ASCII
1299character should not be taken as the indication of the end of an IRI.
1300Such applications also would need to make sure that they correctly
1301convert the detected IRI from the character encoding of the document
1302or application where the IRI appears, to the character encoding used
1303by the system-wide IRI invocation mechanism, or to a URI (according to
1304<xref target="mapping"/>) if the system-wide invocation mechanism only
1305accepts URIs.</t>
1306
1307<t>The clipboard is another frequently used way to transfer URIs and
1308IRIs from one application to another. On most platforms, the clipboard
1309is able to store and transfer text in many languages and scripts.
1310Correctly used, the clipboard transfers characters, not octets, which
1311will do the right thing with IRIs.</t>
1312</section><!-- transfer -->
1313
1314<section title="URI/IRI Generation">
1315
1316<t>Systems that offer resources through the Internet, where those
1317resources have logical names, sometimes automatically generate URIs
1318for the resources they offer. For example, some HTTP servers can
1319generate a directory listing for a file directory and then respond to
1320the generated URIs with the files.</t>
1321
1322<t>Many legacy character encodings are in use in various file systems.
1323Many currently deployed systems do not transform the local character
1324representation of the underlying system before generating URIs.</t>
1325
1326<t>For maximum interoperability, systems that generate resource
1327identifiers should make the appropriate transformations. For example,
1328if a file system contains a file named
1329"r&amp;#xE9;sum&amp;#xE9;.html", a server should expose this as
1330"r%C3%A9sum%C3%A9.html" in a URI, which allows use of
1331"r&amp;#xE9;sum&amp;#xE9;.html" in an IRI, even if locally the file
1332name is kept in a character encoding other than UTF-8.
1333</t>
1334
1335<t>This recommendation particularly applies to HTTP servers. For FTP
1336servers, similar considerations apply; see <xref target="RFC2640"/>.</t>
1337</section><!-- generation -->
1338
1339<section title="URI/IRI Selection" anchor="selection">
1340<t>In some cases, resource owners and publishers have control over the
1341IRIs used to identify their resources. This control is mostly
1342executed by controlling the resource names, such as file names,
1343directly.</t>
1344
1345<t>In these cases, it is recommended to avoid choosing IRIs that are
1346easily confused. For example, for US-ASCII, the lower-case ell ("l") is
1347easily confused with the digit one ("1"), and the upper-case oh ("O") is
1348easily confused with the digit zero ("0"). Publishers should avoid
1349confusing users with "br0ken" or "1ame" identifiers.</t>
1350
1351<t>Outside the US-ASCII repertoire, there are many more opportunities for
1352confusion; a complete set of guidelines is too lengthy to include
1353here. As long as names are limited to characters from a single script,
1354native writers of a given script or language will know best when
1355ambiguities can appear, and how they can be avoided. What may look
1356ambiguous to a stranger may be completely obvious to the average
1357native user. On the other hand, in some cases, the UCS contains
1358variants for compatibility reasons; for example, for typographic purposes.
1359These should be avoided wherever possible. Although there may be exceptions,
1360newly created resource names should generally be in NFKC
1361<xref target="UTR15"></xref> (which means that they are also in NFC).</t>
1362
1363<t>As an example, the UCS contains the "fi" ligature at U+FB01
1364for compatibility reasons.
1365Wherever possible, IRIs should use the two letters "f" and "i" rather
1366than the "fi" ligature. An example where the latter may be used is
1367in the query part of an IRI for an explicit search for a word written
1368containing the "fi" ligature.</t>
1369
1370<t>In certain cases, there is a chance that characters from different
1371scripts look the same. The best known example is the similarity of the
1372Latin "A", the Greek "Alpha", and the Cyrillic "A". To avoid such
1373cases, IRIs should only be created where all the characters in a
1374single component are used together in a given language. This usually
1375means that all of these characters will be from the same script, but
1376there are languages that mix characters from different scripts (such
1377as Japanese).  This is similar to the heuristics used to distinguish
1378between letters and numbers in the examples above. Also, for Latin,
1379Greek, and Cyrillic, using lowercase letters results in fewer
1380ambiguities than using uppercase letters would.</t>
1381</section><!-- selection -->
1382
1383<section title="Display of URIs/IRIs" anchor="display">
1384<t>
1385In situations where the rendering software is not expected to display
1386non-ASCII parts of the IRI correctly using the available layout and font
1387resources, these parts should be percent-encoded before being displayed.</t>
1388
1389<t>For display of Bidi IRIs, please see <xref target="Bidi"/>.</t>
1390</section> <!-- display -->
1391
1392<section title="Interpretation of URIs and IRIs">
1393<t>Software that interprets IRIs as the names of local resources should
1394accept IRIs in multiple forms and convert and match them with the
1395appropriate local resource names.</t>
1396
1397<t>First, multiple representations include both IRIs in the native
1398character encoding of the protocol and also their URI counterparts.</t>
1399
1400<t>Second, it may include URIs constructed based on character
1401encodings other than UTF-8. These URIs may be produced by user agents that do
1402not conform to this specification and that use legacy character encodings to
1403convert non-ASCII characters to URIs. Whether this is necessary, and what
1404character encodings to cover, depends on a number of factors, such as
1405the legacy character encodings used locally and the distribution of
1406various versions of user agents. For example, software for Japanese
1407may accept URIs in Shift_JIS and/or EUC-JP in addition to UTF-8.</t>
1408
1409<t>Third, it may include additional mappings to be more user-friendly
1410and robust against transmission errors. These would be similar to how
1411some servers currently treat URIs as case insensitive or perform
1412additional matching to account for spelling errors. For characters
1413beyond the US-ASCII repertoire, this may, for example, include
1414ignoring the accents on received IRIs or resource names. Please note
1415that such mappings, including case mappings, are language
1416dependent.</t>
1417
1418<t>It can be difficult to identify a resource unambiguously if too
1419many mappings are taken into consideration. However, percent-encoded
1420and not percent-encoded parts of IRIs can always be clearly distinguished.
1421Also, the regularity of UTF-8 (see <xref target="Duerst97"/>) makes the
1422potential for collisions lower than it may seem at first.</t>
1423</section> <!-- interpretation -->
1424
1425<section title="Upgrading Strategy">
1426<t>Where this recommendation places further constraints on software
1427for which many instances are already deployed, it is important to
1428introduce upgrades carefully and to be aware of the various
1429interdependencies.</t>
1430
1431<t>If IRIs cannot be interpreted correctly, they should not be created,
1432generated, or transported. This suggests that upgrading URI interpreting
1433software to accept IRIs should have highest priority.</t>
1434
1435<t>On the other hand, a single IRI is interpreted only by a single or
1436very few interpreters that are known in advance, although it may be
1437entered and transported very widely.</t>
1438
1439<t>Therefore, IRIs benefit most from a broad upgrade of software to be
1440able to enter and transport IRIs. However, before an
1441individual IRI is published, care should be taken to upgrade the corresponding
1442interpreting software in order to cover the forms expected to be
1443received by various versions of entry and transport software.</t>
1444
1445<t>The upgrade of generating software to generate IRIs instead of using a
1446local character encoding should happen only after the service is upgraded
1447to accept IRIs. Similarly, IRIs should only be generated when the service
1448accepts IRIs and the intervening infrastructure and protocol is known
1449to transport them safely.</t>
1450
1451<t>Software converting from URIs to IRIs for display should be upgraded
1452only after upgraded entry software has been widely deployed to the
1453population that will see the displayed result.</t>
1454
1455
1456<t>Where there is a free choice of character encodings, it is often
1457possible to reduce the effort and dependencies for upgrading to IRIs
1458by using UTF-8 rather than another encoding. For example, when a new
1459file-based Web server is set up, using UTF-8 as the character encoding
1460for file names will make the transition to IRIs easier. Likewise, when
1461a new Web form is set up using UTF-8 as the character encoding of the
1462form page, the returned query URIs will use UTF-8 as the character
1463encoding (unless the user, for whatever reason, changes the character
1464encoding) and will therefore be compatible with IRIs.</t>
1465
1466
1467<t>These recommendations, when taken together, will allow for the
1468extension from URIs to IRIs in order to handle characters other than
1469US-ASCII while minimizing interoperability problems. For
1470considerations regarding the upgrade of URI scheme definitions, see
1471<xref target="UTF8use"/>.</t>
1472
1473</section> <!-- upgrading -->
1474</section> <!-- guidelines -->
1475
1476<section title="IANA Considerations" anchor="iana">
1477
1478<t>NOTE: THIS SECTION NEEDS REVIEW AGAINST HAPPIANA WORK.</t>
1479
1480<t>RFC Editor and IANA note: Please Replace RFC XXXX with the
1481number of this document when it issues as an RFC, and RFC YYYY
1482with the number of the RFC issued for draft-ietf-iri-rfc3987bis. </t>
1483
1484<t>IANA maintains a registry of "URI schemes".  This document attempts
1485to make it clear from the registry that a "URI scheme" also serves an
1486"IRI scheme", and makes several changes to the registry. </t>
1487
1488<t>The description of the registry should be changed: "RFC 4395
1489defined an IANA-maintained registry of URI Schemes. RFC XXXX updates
1490this registry to make it clear that the registered values also serve
1491as IRI schemes, as defined in RFC YYYY." </t>
1492
1493<t>The registry includes schemes marked as Permanent or Provisional.
1494Previously, this was accomplished by having two sections, "Permanent"
1495and "Provisional". However, in order to allow other status
1496("Historical", and possibly a Proposed status for proposals which have
1497been received but not accepted), the registry should be changed so
1498that the status is indicated in a separate "Status" column, whose
1499values may be "Permanent", "Provisional" or "Historical".
1500Changes in status as well as updates to the entire registration
1501may be accomplished by requests and expert review.
1502</t>
1503
1504
1505</section> <!-- IANA -->
1506   
1507<section title="Security Considerations" anchor="security">
1508<t>The security considerations discussed in <xref target="RFC3986"/>
1509also apply to IRIs. In addition, the following issues require
1510particular care for IRIs.</t>
1511<t>Incorrect encoding or decoding can lead to security problems.
1512For example, some UTF-8 decoders do not check against overlong
1513byte sequences. See <xref target='UTR36'/> Section 3 for details.</t>
1514
1515  <t>There are serious difficulties with relying on a human to verify that a
1516    an IRI (whether presented visually or aurally)
1517    is the same as another IRI or is the one intended.
1518    These problems exist with ASCII-only URIs (bl00mberg.com vs. bloomberg.com)
1519    but are strongly exacerbated when using the much larger character repertoire of Unicode.
1520    For details, see Section 2 of <xref target='UTR36'/>.
1521    Using administrative and technical means to reduce the availability
1522    of such exploits is possible, but they are difficult to eliminate altogether.
1523    User agents SHOULD NOT rely on visual or perceptual comparison or verification of IRIs
1524    as a means of validating or assuring safety, correctness or appropriateness of an IRI.
1525    Other means of presenting users with the validity, safety, or appropriateness
1526    of visited sites are being developed in the browser community
1527    as an alternative means of avoiding these difficulties.</t>
1528
1529<t>Besides the large character repertoire of Unicode, reasons for
1530  confusion include different forms of normalization and different normalization
1531  expectations, use of percent-encoding with various legacy encodings,
1532  and bidirectionality issues. See also <xref target="Bidi"/>.</t>
1533
1534<t>Confusion can occur in various IRI components, such as the
1535domain name part or the path part, or between IRI components. For considerations specific
1536to the domain name part, see <xref target="RFC5890"/>. For considerations specific to
1537particular protocols or schemes, see the security sections of the relevant specifications
1538and registration templates.
1539Administrators of sites that allow independent
1540users to create resources in the same sub area have to be careful.
1541Details are discussed in <xref target="selection"/>.</t>
1542
1543  <t>The characters additionally allowed in Legacy Extended IRIs
1544    introduce additional security issues. For details, see <xref target='notAllowed'/>.</t>
1545</section><!-- security -->
1546
1547<section title="Acknowledgements">
1548<t>This document was derived from <xref target="RFC3987"/>; the acknowledgments from
1549that specification still apply.</t>
1550<t>In addition, this document was influenced by contributions from (in no particular order)
1551  Norman Walsh, Richard Tobin,
1552  Henry S. Thomson, John Cowan, Paul Grosso, the XML Core Working Group of the W3C,
1553  Chris Lilley, Bjoern Hoehrmann,
1554Felix Sasaki, Jeremy Carroll, Frank Ellermann, Michael Everson, Cary Karp, Matitiahu Allouche,
1555Richard Ishida, Addison Phillips, Jonathan Rosenne, Najib Tounsi, Debbie Garside, Mark Davis, Sarmad
1556Hussain, Ted Hardie, Konrad Lanz, Thomas Roessler, Lisa Dusseault, Julian Reschke, Giovanni
1557Campagna, Anne van Kesteren, Mark Nottingham, Erik van der Poel, Marcin Hanclik, Marcos Caceres, Roy
1558Fielding, Greg Wilkins, Pieter Hintjens, Daniel R. Tobias, Marko Martin, Maciej Stanchowiak, Wil
1559Tan, Yui Naruse, Michael A. Puls II, Dave Thaler, Tom Petch, John Klensin, Shawn Steele, Peter
1560Saint-Andre, Geoffrey Sneddon, Chris Weber, Alex Melnikov, Slim Amamou, S. Moonesamy, Tim Berners-Lee, Yaron
1561Goland, Sam Ruby, Adam Barth, Abdulrahman I. ALGhadir, Aharon Lanin, Thomas Milo, Murray Sargent,
1562Marc Blanchet, and Mykyta Yevstifeyev.</t>
1563</section> <!-- Acknowledgements -->
1564
1565<section title="Main Changes Since RFC 3987">
1566  <t>This section describes the main changes since <xref target="RFC3987"></xref>.</t>
1567  <section title="Split out Bidi, processing guidelines, comparison sections">
1568    <t>Move some components (comparison, bidi, processing) into separate documents.</t>
1569  </section>
1570  <section title="Major restructuring of IRI processing model" anchor="forkChanges">
1571    <t>Major restructuring of IRI processing model to make scheme-specific translation
1572      necessary to handle IDNA requirements and for consistency with web implementations. </t>
1573    <t>Starting with IRI, you want one of:
1574      <list style="hanging">
1575        <t hangText="a"> IRI components (IRI parsed into UTF8 pieces)</t>
1576        <t hangText="b"> URI components (URI parsed into ASCII pieces, encoded correctly) </t>
1577        <t hangText="c"> whole URI  (for passing on to some other system that wants whole URIs) </t>
1578      </list></t>
1579   
1580    <section title="OLD WAY">
1581      <t><list style="numbers">
1582       
1583        <t>Pct-encoding on the whole thing to a URI.
1584          (c1) If you want a (maybe broken) whole URI, you might
1585          stop here.</t>
1586       
1587        <t>Parsing the URI into URI components.
1588          (b1) If you want (maybe broken) URI components, stop here.</t>
1589       
1590        <t> Decode the components (undoing the pct-encoding).
1591          (a) if you want IRI components, stop here.</t>
1592       
1593        <t> reencode:  Either using a different encoding some components
1594          (for domain names, and query components in web pages, which
1595          depends on the component, scheme and context), and otherwise
1596          using pct-encoding.
1597          (b2) if you want (good) URI components, stop here.</t>
1598       
1599        <t> reassemble the reencoded components.
1600          (c2) if you want a (*good*) whole URI stop here.</t>
1601      </list>
1602       
1603      </t>
1604     
1605    </section>
1606   
1607    <section title="NEW WAY">
1608      <t>
1609        <list style="numbers">
1610         
1611          <t> Parse the IRI into IRI components using the generic syntax.
1612            (a) if you want IRI components, stop here.</t>
1613         
1614          <t> Encode each components, using pct-encoding, IDN encoding, or
1615            special query part encoding depending on the component
1616            scheme or context. (b) If you want URI components, stop here.</t>
1617          <t> reassemble the a whole URI from URI components.
1618            (c) if you want a whole URI stop here.</t>
1619        </list></t>
1620    </section>
1621    <section title="Extension of Syntax">
1622      <t>Added the tag range (U+E0000-E0FFF) to the iprivate production.
1623        Some IRIs generated with the new syntax may fail to pass very strict checks
1624        relying on the old syntax. But characters in this range should be extremely infrequent
1625        anyway.</t>
1626    </section>
1627    <section title="More to be added"><t>TODO: There are more main changes that need to be
1628      documented in this section.</t></section>
1629</section>
1630
1631<section title="Change Log">
1632
1633<t>Note to RFC Editor: Please completely remove this section before publication.</t>
1634
1635<section title='Changes after draft-ietf-iri-3987bis-01'>
1636    <t>Changes from draft-ietf-iri-3987bis-01 onwards are available as changesets
1637      in the IETF tools subversion repository at
1638      http://trac.tools.ietf.org/wg/iri/trac/log/draft-ietf-iri-3987bis/draft-ietf-iri-3987bis.xml.</t>
1639</section>
1640 
1641<section title='Changes from draft-duerst-iri-bis-07 to draft-ietf-iri-3987bis-00'>
1642     <t>Changed draft name, date, last paragraph of abstract, and titles in change log, and added this section
1643     in moving from draft-duerst-iri-bis-07 (personal submission) to draft-ietf-iri-3987bis-00 (WG document).</t>
1644</section>
1645
1646<section title="Changes from -06 to -07 of draft-duerst-iri-bis">
1647  <t>Major restructuring of the processing model, see <xref target="forkChanges"></xref>.</t>
1648</section>
1649</section>
1650
1651<section title='Changes from -00 to -01'><t><list style="symbols">
1652  <t>Removed 'mailto:' before mail addresses of authors.</t>
1653  <t>Added "&lt;to be done&gt;" as right side of 'href-strip' rule. Fixed '|' to '/' for
1654    alternatives.</t>
1655</list></t>
1656</section>
1657
1658<section title="Changes from -05 to -06 of draft-duerst-iri-bis-00"><t><list style="symbols">
1659<t>Add HyperText Reference, change abstract, acks and references for it</t>
1660<t>Add Masinter back as another editor.</t>
1661<t>Masinter integrates HRef material from HTML5 spec.</t>
1662<t>Rewrite introduction sections to modernize.</t>
1663</list></t>
1664</section>
1665
1666<section title="Changes from -04 to -05 of draft-duerst-iri-bis">
1667  <t><list style="symbols">
1668    <t>Updated references.</t>
1669    <t>Changed IPR text to pre5378Trust200902.</t></list></t>
1670</section>
1671
1672<section title="Changes from -03 to -04 of draft-duerst-iri-bis">
1673  <t><list style="symbols">
1674    <t>Added explicit abbreviation for LEIRIs.</t>
1675    <t>Mentioned LEIRI references.</t>
1676    <t>Completed text in LEIRI section about tag characters and about specials.</t></list></t>
1677</section>
1678
1679<section title="Changes from -02 to -03 of draft-duerst-iri-bis">
1680  <t><list style="symbols">
1681    <t>Updated some references.</t>
1682    <t>Updated Michel Suginard's coordinates.</t></list></t>
1683</section>
1684
1685<section title="Changes from -01 to -02 of draft-duerst-iri-bis">
1686  <t><list style="symbols">
1687    <t>Added tag range to iprivate (issue private-include-tags-115).</t>
1688    <t>Added Specials (U+FFF0-FFFD) to Legacy Extended IRIs.</t></list></t>
1689</section>
1690<section title="Changes from -00 to -01 of draft-duerst-iri-bis">
1691  <t><list style="symbols">
1692    <t>Changed from "IRIs with Spaces/Controls" to "Legacy Extended IRI"
1693      based on input from the W3C XML Core WG.
1694      Moved the relevant subsections to the back and promoted them to a section.</t>
1695    <t>Added some text re. Legacy Extended IRIs to the security section.</t>
1696    <t>Added a IANA Consideration Section.</t>
1697    <t>Added this Change Log Section.</t>
1698    <t>Added a section about "IRIs with Spaces/Controls" (converting from a Note in RFC 3987).</t></list></t>
1699</section> <!-- -00 to -01 -->
1700<section title="Changes from RFC 3987 to -00 of draft-duerst-iri-bis">
1701  <t><list>
1702    <t>Fixed errata (see http://www.rfc-editor.org/cgi-bin/errataSearch.pl?rfc=3987).</t></list></t>
1703</section> <!-- from 3987 -->
1704</section>
1705</middle>
1706
1707<back>
1708<references title="Normative References">
1709
1710<reference anchor="ASCII">
1711<front>
1712<title>Coded Character Set -- 7-bit American Standard Code for Information
1713Interchange</title>
1714<author>
1715<organization>American National Standards Institute</organization>
1716</author>
1717<date year="1986"/>
1718</front>
1719<seriesInfo name="ANSI" value="X3.4"/>
1720</reference>
1721
1722  <reference anchor="ISO10646" target='http://standards.iso.org/ittf/PubliclyAvailableStandards/c051273_ISO_IEC_10646_2011(E).zip'>
1723<front>
1724<title>ISO/IEC 10646:2011: Information Technology -
1725Universal Multiple-Octet Coded Character Set (UCS)</title>
1726<author>
1727<organization>International Organization for Standardization</organization>
1728</author>
1729<date month="March" year="20011"/>
1730</front>
1731<seriesInfo name="ISO" value="Standard 10646"/>
1732</reference>
1733
1734&rfc2119;
1735&rfc3491;
1736
1737  <reference anchor="STD63">
1738    <front>
1739      <title abbrev="UTF-8">UTF-8, a transformation format of ISO 10646</title>
1740      <author initials="F." surname="Yergeau" ifullname="François Yergeau" fullname="Francois Yergeau"></author>
1741      <date month="November" year="2003"/>
1742    </front>
1743    <seriesInfo name="STD" value="63"/>
1744    <seriesInfo name="RFC" value="3629"/>
1745   
1746  </reference>
1747 
1748&rfc3986;
1749
1750<reference anchor="STD68">
1751<front>
1752<title abbrev="ABNF">Augmented BNF for Syntax Specifications: ABNF</title>
1753<author initials="D." surname="Crocker" fullname="Dave Crocker"><organization/></author>
1754<author initials="P." surname="Overell" fullname="Paul Overell"><organization/></author>
1755<date month="January" year="2008"/></front>
1756<seriesInfo name="STD" value="68"/><seriesInfo name="RFC" value="5234"/>
1757</reference>
1758 
1759&rfc5890;
1760&rfc5891;
1761
1762  <reference anchor="RFC5892">
1763    <front>
1764      <title>The Unicode Code Points and Internationalized Domain Names for Applications (IDNA)</title>
1765      <author initials="P." surname="Faltstrom" isurname="Fältström" fullname="P. Faltstrom" ifullname="P. Fältström">
1766        <organization/>
1767      </author>
1768      <date year="2010" month="August"/>
1769    </front>
1770    <seriesInfo name="RFC" value="5892"/>
1771    <format type="TXT" octets="187370" target="http://www.rfc-editor.org/rfc/rfc5892.txt"/>
1772  </reference>
1773
1774<reference anchor="UNIV6">
1775<front>
1776<title>The Unicode Standard, Version 6.1.0 (Mountain View, CA, The Unicode Consortium, 2012, ISBN 978-1-936213-02-3)</title>
1777<author><organization>The Unicode Consortium</organization></author>
1778<date year="2012" />
1779</front>
1780</reference>
1781
1782<reference anchor="UTR15" target="http://www.unicode.org/unicode/reports/tr15/tr15-23.html">
1783<front>
1784<title>Unicode Normalization Forms</title>
1785<author initials="M." surname="Davis" fullname="Mark Davis"><organization/></author>
1786  <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"><organization/></author>
1787<date year="2008" month="March"/>
1788</front>
1789<seriesInfo name="Unicode Standard Annex" value="#15"/>
1790</reference>
1791
1792</references>
1793
1794<references title="Informative References">
1795
1796  <reference anchor='CharMod' target='http://www.w3.org/TR/2004/CR-charmod-resid/'>
1797    <front>
1798      <title>Character Model for the World Wide Web 1.0: Resource Identifiers</title>
1799      <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"/>
1800      <author initials="F." surname="Yergeau" ifullname="François Yergeau" fullname="Francois Yergeau"></author>
1801      <author fullname='Richard Ishida' surname='Ishida' initials='R. '/>
1802      <author fullname='Misha Wolf' surname='Wolf' initials='M. '/>
1803      <author fullname='Tex Texin' surname='Texin' initials='T. '/>
1804      <date year='2004' month='November' day='22'/>
1805    </front>
1806    <seriesInfo name='W3C Candidate Recommendation' value='CR-charmod-resid-20041122'/>
1807  </reference>
1808
1809<reference anchor="Duerst97" target="http://www.ifi.unizh.ch/mml/mduerst/papers/PDF/IUC11-UTF-8.pdf">
1810<front>
1811<title>The Properties and Promises of UTF-8</title>
1812  <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"></author>
1813<date year="1997" month="September"/>
1814</front>
1815<seriesInfo name="Proc. 11th International Unicode Conference, San Jose" value=""/>
1816</reference>
1817
1818<reference anchor="Gettys" target="http://www.w3.org/DesignIssues/ModelConsequences">
1819<front>
1820<title>URI Model Consequences</title>
1821<author initials="J." surname="Gettys" fullname="Jim Gettys"><organization/></author>
1822<date month="" year=""/>
1823</front>
1824</reference>
1825
1826<reference anchor='HTML4' target='http://www.w3.org/TR/1999/REC-html401'>
1827<front>
1828<title>HTML 4.01 Specification</title>
1829<author fullname='David Raggett' surname='Raggett' initials='D. '/>
1830<author fullname='Arnaud Le Hors' surname='Le Hors' initials='A. '/>
1831<author fullname='Ian Jacobs' surname='Jacobs' initials='I. '/>
1832<date year='1999' month='December' day='24'/>
1833</front>
1834<seriesInfo name='W3C Recommendation' value='REC-html401-19991224'/>
1835</reference>
1836&rfc2130;
1837&rfc2141;
1838&rfc2192;
1839&rfc2277;
1840&rfc2384;
1841&rfc2396;
1842&rfc2397;
1843&rfc2616;
1844&rfc2640;
1845
1846  <reference anchor="RFC3987">
1847    <front>
1848      <title>Internationalized Resource Identifiers (IRIs)</title>
1849      <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"/>
1850      <author initials="M." surname="Suignard" fullname="M. Suignard">
1851        <organization/>
1852      </author>
1853      <date year="2005" month="January"/>
1854    </front>
1855    <seriesInfo name="RFC" value="3987"/>
1856    <format type="TXT" octets="111190" target="http://www.rfc-editor.org/rfc/rfc3987.txt"/>
1857  </reference>
1858
1859&rfc5122;
1860&rfc6055;
1861
1862  <reference anchor="RFC6068">
1863    <front>
1864      <title>
1865        The 'mailto' URI Scheme
1866      </title>
1867      <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"/>
1868      <author initials="L." surname="Masinter" fullname="L. Masinter">
1869        <organization/>
1870      </author>
1871      <author initials="J." surname="Zawinski" fullname="J. Zawinski">
1872        <organization/>
1873      </author>
1874      <date year="2010" month="October"/>
1875    </front>
1876    <seriesInfo name="RFC" value="6068"/>
1877    <format type="TXT" octets="36683" target="http://www.rfc-editor.org/rfc/rfc6068.txt"/>
1878  </reference>
1879
1880<reference anchor='Bidi'>
1881  <front>
1882    <title>Guidelines for Internationalized Resource Identifiers with Bi-directional Characters (Bidi IRIs)</title>
1883    <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"/>
1884    <author initials='L.' surname='Masinter' />
1885    <author initials="A." isurname="Allawi (عادل علاوي)" surname="Allawi"
1886      ifullname="عادل علاوي" fullname="Adil Allawi"/>    <date year="2012" month="March" day="9" />
1887  </front>
1888  <seriesInfo name="Internet-Draft" value="draft-ietf-iri-bidi-guidelines-02"/>
1889</reference>
1890
1891<reference anchor='Equivalence'>
1892  <front>
1893    <title>Equivalence and Canonicalization of Internationalized Resource Identifiers (IRIs)</title>
1894    <author initials='L.' surname='Masinter' />
1895    <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"/>
1896    <date year="2012" month="March" day="2" />
1897  </front>
1898  <seriesInfo name="Internet-Draft" value="draft-ietf-iri-comparison-01"/>
1899</reference>
1900
1901<reference anchor='RFC4395bis'>
1902  <front>
1903    <title>Guidelines and Registration Procedures for New URI/IRI Schemes</title>
1904    <author initials='T.' surname='Hansen' fullname="Tony Hansen"><organization/></author>
1905    <author initials='T.' surname='Hardie' fullname="Ted Hardie"><organization/></author>
1906    <author initials='L.' surname='Masinter' fullname="Larry Masinter"><organization/></author>
1907    <date year='2011' month='December'/>
1908    <workgroup>IRI</workgroup>
1909  </front>
1910  <seriesInfo name="Internet-Draft" value="draft-ietf-iri-4395bis-irireg-04"/>
1911</reference>
1912 
1913 
1914<reference anchor="UNIXML" target="http://www.w3.org/TR/unicode-xml/">
1915<front>
1916<title>Unicode in XML and other Markup Languages</title>
1917  <author  initials="M.J." isurname="Dürst" surname="Duerst" ifullname="Martin J. Dürst" fullname="Martin J. Duerst"><organization/></author>
1918<author initials="A." surname="Freytag" fullname="Asmus Freytag"><organization/></author>
1919<date year="2003" month="June" day="18"/>
1920</front>
1921<seriesInfo name="Unicode Technical Report" value="#20"/>
1922<seriesInfo name="World Wide Web Consortium" value="Note"/>
1923</reference>
1924 
1925<reference anchor="UTR36" target="http://unicode.org/reports/tr36/">
1926<front>
1927<title>Unicode Security Considerations</title>
1928<author initials="M." surname="Davis" fullname="Mark Davis"><organization/></author>
1929<author initials="M." surname="Suignard" fullname="Michel Suignard"><organization/></author>
1930<date year="2010" month="August" day="4"/>
1931</front>
1932<seriesInfo name="Unicode Technical Report" value="#36"/>
1933</reference>
1934
1935<reference anchor='XLink' target='http://www.w3.org/TR/xlink11/#link-locators'>
1936<front>
1937<title>XML Linking Language (XLink) Version 1.1</title>
1938<author fullname='Steve DeRose' surname='DeRose' initials='S. '/>
1939<author fullname='Eve Maler' surname='Maler' initials='E. '/>
1940<author fullname='David Orchard' surname='Orchard' initials='D. '/>
1941<author fullname='Norman Walsh' surname='Walsh' initials='N. '/>
1942<date year='2010' month='May' day='06'/>
1943</front>
1944<seriesInfo name='W3C Recommendation' value='REC-xlink11-20100506'/>
1945</reference>
1946 
1947<reference anchor='XML1' target='http://www.w3.org/TR/2008/REC-xml/'>
1948<front>
1949<title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
1950<author fullname='Tim Bray' surname='Bray' initials='T. '/>
1951<author fullname='Jean Paoli' surname='Paoli' initials='J. '/>
1952<author fullname='C. M. Sperberg-McQueen' surname='Sperberg-McQueen' initials='C. M. '/>
1953<author fullname='Eve Maler' surname='Maler' initials='E. '/>
1954<author initials="F." surname="Yergeau" ifullname="François Yergeau" fullname="Francois Yergeau"/>
1955<date year='2008' month='November' day='26'/>
1956</front>
1957<seriesInfo name='W3C Recommendation' value='REC-xml-20081126'/>
1958</reference>
1959 
1960<reference anchor="XMLSchema" target="http://www.w3.org/TR/xmlschema-2/#anyURI">
1961<front>
1962<title>XML Schema Part 2: Datatypes Second Edition</title>
1963<author fullname='Paul V. Biron' surname='Biron' initials='P. V. '/>
1964<author fullname='Ashok Malhotra' surname='Malhotra' initials='A. '/>
1965<date year='2004' month='October' day='28'/>
1966</front>
1967<seriesInfo name='W3C Recommendation' value='REC-xmlschema-2-20041028'/>
1968</reference>
1969 
1970<reference anchor="XPointer" target="http://www.w3.org/TR/xptr-framework/#escaping">
1971<front>
1972<title>XPointer Framework</title>
1973<author fullname='Paul Grosso' surname='Grosso' initials='P. '/>
1974<author fullname='Eve Maler' surname='Maler' initials='E. '/>
1975<author fullname='Jonathan Marsh' surname='Marsh' initials='J. '/>
1976<author fullname='Norman Walsh' surname='Walsh' initials='N. '/>
1977<date year='2003' month='March' day='25'/>
1978</front>
1979<seriesInfo name='W3C Recommendation' value='REC-xptr-framework-20030325'/>
1980</reference>
1981
1982</references>
1983
1984</back>
1985</rfc>
Note: See TracBrowser for help on using the repository browser.