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

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

added some non-ASCII names in Ack; way not complete yet

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