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

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

removed "byte order identification" from Specials (U+FFF0-FFFD) because it's factually wrong (U+FFFE is used for byte order identification)

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