<?xml version="1.0" encoding="UTF-8"?>
<!--
    This XML document is the output of clean-for-DTD.xslt; a tool that strips
    extensions to RFC2629(bis) from documents for processing with xml2rfc.
-->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc subcompact="no"?>
<?rfc rfcedstyle="yes"?>
<!DOCTYPE rfc
  PUBLIC "" "rfc2629.dtd">
<rfc obsoletes="5987" ipr="trust200902" docName="draft-ietf-httpbis-rfc5987bis-03" category="std">
  
	<front>
  <title abbrev="Charset/Language Encoding in HTTP">Indicating Character Encoding and Language for HTTP Header Field Parameters</title>
  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
    <organization abbrev="greenbytes">greenbytes GmbH</organization>
    <address>
      <postal>
        <street>Hafenweg 16</street>
        <city>Münster</city><region>NW</region><code>48155</code>
        <country>Germany</country>
      </postal>
      <email>julian.reschke@greenbytes.de</email>	
      <uri>http://greenbytes.de/tech/webdav/</uri>	
    </address>
  </author>

  <date year="2016" month="October" day="11"/>
  
  <area>Applications and Real-Time</area>
  <workgroup>HTTP Working Group</workgroup>
  <keyword>HTTP</keyword>
  <keyword>header field parameter</keyword>
  <keyword>internationalization</keyword>

  <abstract>
    <t>
      By default, header field values in Hypertext Transfer Protocol (HTTP)
      messages cannot easily carry characters outside the US-ASCII coded
      character set. RFC 2231 defines an encoding mechanism for use in
      parameters inside Multipurpose Internet Mail Extensions (MIME) header
      field values. This document specifies an encoding suitable for use in
      HTTP header fields that is compatible with a simplified profile of the
      encoding defined in RFC 2231.
    </t>
  </abstract>

  <note title="Editorial Note (To be removed by RFC Editor before publication)">
    <t>
      Discussion of this draft takes place on the HTTPBIS working group mailing list
      (ietf-http-wg@w3.org), which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
    </t>
    <t>
      Working Group information can be found at <eref target="http://httpwg.github.io/"/>; source code and issues
      list for this draft can be found at
      <eref target="https://github.com/httpwg/http-extensions"/>.
    </t>
    <t>
      The changes in this draft are summarized in <xref target="change.log"/>.
    </t>
  </note>

  </front>
  <middle>

<section anchor="introduction" title="Introduction">
<t>
  Use of characters outside the US-ASCII coded character set (<xref target="RFC0020"/>)
  in HTTP header fields (<xref target="RFC7230"/>) is non-trivial:
</t>
<t><list style="symbols">
  <t>The HTTP specification discourages use of non-US-ASCII characters in field
  values, placing them into the "obs-text" ABNF production (<xref target="RFC7230"/>, Section 3.2).</t>
  <t>Furthermore, it stays silent about default character encoding schemes for
  field values, so any use of non-US-ASCII characters would need to be specific
  to the field definition, or would require some other kind of out-of-band information.</t>
  <t>Finally, some APIs assume a default character encoding scheme in order to map from the octet sequences (obtained from the HTTP message) to character sequences:
  for instance, the XMLHttpRequest API (<xref target="XMLHttpRequest"/>) uses the Interface Definition Language type "ByteString",
  effectively resulting in the ISO-8859-1 character encoding scheme <xref target="ISO-8859-1"/>
  being used.
  </t>
</list></t>
<t>  
  On the other hand, RFC 2231 defines an encoding mechanism for parameters
  inside MIME header fields (<xref target="RFC2231"/>), which, as opposed to
  HTTP messages, do need to be sent over non-binary transports.
  This document specifies an encoding suitable for use in HTTP header fields
  that is compatible with a simplified profile of the encoding defined in RFC 2231.
  It can be applied to any HTTP header field that uses the common "parameter"
  ("name=value") syntax.
</t>
<t>
  This document obsoletes <xref target="RFC5987"/> and
  moves it to "historic" status; the changes are summarized
  in <xref target="changes.from.rfc5987"/>.
</t>
<t><list>
  <t>
    Note: in the remainder of this document, RFC 2231 is only referenced
    for the purpose of explaining the choice of features that were adopted; they
    are therefore purely informative.
  </t>
</list></t>
<t><list>
  <t>
    Note: this encoding does not apply to message payloads
    transmitted over HTTP, such as when using the media type "multipart/form-data"
    (<xref target="RFC7578"/>).
  </t>
</list></t>
</section>  

<section title="Notational Conventions">
<t>
  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document
  are to be interpreted as described in <xref target="RFC2119"/>.
</t>
<t>
  This specification uses the ABNF (Augmented Backus-Naur Form) notation defined in
  <xref target="RFC5234"/>. The following core rules are included by
  reference, as defined in <xref target="RFC5234"/>, Appendix B.1:
  ALPHA (letters), DIGIT (decimal 0-9), HEXDIG (hexadecimal 0-9/A-F/a-f), and
  LWSP (linear whitespace).
</t>
<t>
  This specification uses terminology defined in <xref target="RFC6365"/>,
  namely: "character encoding scheme" (below abbreviated to
  "character encoding"), "charset"
  and "coded character set".
</t>
<t>
  Note that this differs from RFC 2231, which uses the term "character set"
  for "character encoding scheme".
</t>
</section>  

<section title="Comparison to RFC 2231 and Definition of the Encoding">
<t>
  RFC 2231 defines several extensions to MIME. The sections below discuss
  if and how they apply to HTTP header fields.
</t>
<t>
  In short:
  <list style="symbols">
    <t>Parameter Continuations aren't needed (<xref target="parameter.continuations"/>),</t>
    <t>Character Encoding and Language Information are useful, therefore a simple subset
    is specified (<xref target="character.set.and.language.information"/>), and</t>
    <t>Language Specifications in Encoded Words aren't needed (<xref target="language.specification.in.encoded.words"/>).</t>
  </list>
</t>

<section anchor="parameter.continuations" title="Parameter Continuations">
<t>
  Section 3 of <xref target="RFC2231"/> defines a mechanism that
  deals with the length limitations that apply to MIME headers. These
  limitations do not apply to HTTP (<xref target="RFC7231"/>, Appendix A.6). 
</t>
<t>
  Thus, parameter continuations are not part of the encoding defined by this
  specification.
</t>
</section>

<section anchor="character.set.and.language.information" title="Parameter Value Character Encoding and Language Information">
<t>
  Section 4 of <xref target="RFC2231"/> specifies how to embed
  language information into parameter values, and also how to encode
  non-ASCII characters, dealing with restrictions both in MIME and HTTP
  header field parameters.
</t>
<t>
  However, RFC 2231 does not specify a mandatory-to-implement character encoding,
  making it hard for senders to decide which encoding to use.
  Thus, recipients implementing this specification MUST support the
  "UTF-8" character encoding <xref target="RFC3629"/>.
</t>
<t>
  Furthermore, RFC 2231 allows the character encoding information to be left out.
  The encoding defined by this specification does not allow that.
</t>

<section anchor="definition" title="Definition">
  
<t>
  The presence of extended parameter values usually is indicated by a parameter name
  ending in an asterisk character. Note however that this is just a convention,
  and that it needs to be explicitly specified in the definition of the header
  field using this extension (see <xref target="usage.guidelines"/>).
</t>
<t>
  The ABNF for extended parameter values is specified below:
</t>
<figure><artwork type="abnf"><![CDATA[
  ext-value     = charset  "'" [ language ] "'" value-chars
                ; like RFC 2231's <extended-initial-value>
                ; (see [RFC2231], Section 7)

  charset       = "UTF-8" / mime-charset

  mime-charset  = 1*mime-charsetc
  mime-charsetc = ALPHA / DIGIT
                / "!" / "#" / "$" / "%" / "&"
                / "+" / "-" / "^" / "_" / "`"
                / "{" / "}" / "~"
                ; as <mime-charset> in Section 2.3 of [RFC2978]
                ; except that the single quote is not included
                ; SHOULD be registered in the IANA charset registry

  language      = <Language-Tag, see [RFC5646], Section 2.1>

  value-chars   = *( pct-encoded / attr-char )

  pct-encoded   = "%" HEXDIG HEXDIG
                ; see [RFC3986], Section 2.1

  attr-char     = ALPHA / DIGIT
                / "!" / "#" / "$" / "&" / "+" / "-" / "."
                / "^" / "_" / "`" / "|" / "~"
                ; token except ( "*" / "'" / "%" )
]]></artwork></figure>
<t>
  The value part of an extended parameter (ext-value) is a token that consists
  of three parts:
</t>
<t><list style="numbers">
  <t>the REQUIRED character encoding name (charset),</t>
  <t>the OPTIONAL language information (language), and</t>
  <t>a character sequence representing the
  actual value (value-chars), separated by single quote
  characters.</t>
</list></t>
<t>
  Note that both character encoding names and
  language tags are restricted to the US-ASCII coded character set, and are matched
  case-insensitively (see <xref target="RFC2978"/>, Section 2.3 and
  <xref target="RFC5646"/>, Section 2.1.1).
</t>
<t>
  Inside the value part, characters not contained in attr-char are
  encoded into an octet sequence using the specified character encoding. That octet
  sequence is then percent-encoded as specified in Section 2.1 of <xref target="RFC3986"/>.
</t>
<t>
  Producers MUST use the "UTF-8" (<xref target="RFC3629"/>) character encoding. 
  Extension character encodings (mime-charset) are reserved for future use.
</t>
<t><list>
  <t>
    Note: recipients should be prepared to handle encoding
    errors, such as malformed or incomplete percent escape sequences, or
    non-decodable octet sequences, in a robust manner. This specification
    does not mandate any specific behavior, for instance, the following
    strategies are all acceptable:
    <list style="symbols">
      <t>ignoring the parameter,</t>
      <t>stripping a non-decodable octet sequence,</t>
      <t>substituting a non-decodable octet sequence by a replacement
      character, such as the Unicode character U+FFFD (Replacement Character).</t>
    </list>
  </t>
</list></t>

</section>

<section title="Historical Notes">
<t>
  The 
  RFC 7230 token production (<xref target="RFC7230"/>, Section 3.2.6)
  differs from the production used in RFC 2231 (imported from Section 5.1 of <xref target="RFC2045"/>)
  in that curly braces ("{" and "}") are excluded. Thus, these two
  characters are excluded from the attr-char production as well.     
</t>
<t>
  The &lt;mime-charset&gt; ABNF defined here differs from
  the one in Section 2.3 of <xref target="RFC2978"/> in that it does
  not allow the single quote character (see also RFC Errata ID 1912 <xref target="Err1912"/>). In practice, no character encoding names
  using that character have been registered at the time of this writing.
</t>
<t>
  For backwards compatibility with RFC 2231, the encoding defined by this
  specification deviates from common parameter syntax in that the
  quoted-string notation is not allowed. Implementations using generic parser
  components might not be able to detect the use of quoted-string notation and
  thus might accept that format, although invalid, as well.
</t>
<t>
  <xref target="RFC5987"/> did require support for ISO-8859-1 (<xref target="ISO-8859-1"/>),
  too; for compatibility with legacy code, recipients are encouraged to
  support this encoding as well.
</t>
</section>


<section anchor="examples" title="Examples">
<figure><preamble>
  Non-extended notation, using "token":
</preamble><artwork type="example"><![CDATA[
  foo: bar; title=Economy
]]></artwork></figure>
<figure><preamble>
  Non-extended notation, using "quoted-string":
</preamble><artwork type="example"><![CDATA[
  foo: bar; title="US-$ rates"
]]></artwork></figure>
<figure><preamble>
  Extended notation, using the Unicode character U+00A3 ("£", POUND SIGN):
</preamble><artwork type="example"><![CDATA[
  foo: bar; title*=utf-8'en'%C2%A3%20rates
]]></artwork><postamble>
  Note: the Unicode pound sign character U+00A3 was encoded into the octet sequence C2 A3 using the UTF-8 character encoding, then percent-encoded. Also, note
  that the space character was encoded as %20, as it is not contained in
  attr-char.
</postamble></figure>
<figure><preamble>
  Extended notation, using the Unicode characters U+00A3 ("£", POUND SIGN)
  and U+20AC ("€", EURO SIGN):
</preamble><artwork type="example"><![CDATA[
  foo: bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates
]]></artwork><postamble>
  Note: the Unicode pound sign character U+00A3 was encoded into the octet sequence C2 A3 using the UTF-8 character encoding, then percent-encoded. Likewise,
  the Unicode euro sign character U+20AC was encoded into the octet
  sequence E2 82 AC, then percent-encoded. Also note that HEXDIG allows
  both lowercase and uppercase characters, so recipients must understand
  both, and that the language information is optional, while the character encoding is not.
</postamble></figure>
</section>

</section>

<section anchor="language.specification.in.encoded.words" title="Language Specification in Encoded Words">
<t>
  Section 5 of <xref target="RFC2231"/> extends the encoding
  defined in <xref target="RFC2047"/> to also support language specification
  in encoded words. 
  RFC 2616, the now-obsolete HTTP/1.1 specification, did refer to RFC 2047
  (<xref target="RFC2616"/>, Section 2.2). However, it wasn't clear
  to which header field it applied. Consequently, the current revision of
  the HTTP/1.1 specification has deprecated use of the encoding forms defined in
  RFC 2047 (see Section 3.2.4 of <xref target="RFC7230"/>).
  
</t>
<t>
  Thus, this specification does not include this feature.
</t>
</section>

</section>

<section anchor="usage.guidelines" title="Guidelines for Usage in HTTP Header Field Definitions">
<t>
  Specifications of HTTP header fields that use the extensions defined
  in <xref target="character.set.and.language.information"/> ought to clearly
  state that. A simple way to achieve this is to normatively reference
  this specification, and to include the <xref target="definition" format="none">ext-value</xref>
  production into the ABNF for specific header field parameters.
</t>
<figure><preamble>For instance:</preamble><artwork type="example"><![CDATA[
  foo         = token ";" LWSP title-param
  title-param = "title" LWSP "=" LWSP value
              / "title*" LWSP "=" LWSP ext-value
  ext-value   = <see draft-ietf-httpbis-rfc5987bis, Section 3.2>
]]></artwork><postamble><cref anchor="pub">Upon publication as RFC, the string "draft-ietf-httpbis-rfc5987bis" needs to be replaced with the RFC name, and this comment needs to be removed.</cref></postamble></figure>
<t><list>
  <t>
    Note: The Parameter Value Continuation feature defined in
    Section 3 of <xref target="RFC2231"/> makes it impossible to
    have multiple instances of extended parameters with identical parmname components,
    as the processing of continuations would become ambiguous. Thus, specifications
    using this extension are advised to disallow this case for compatibility
    with RFC 2231.
  </t>
</list></t>
<t><list>
  <t>
    Note: This specification does not automatically assign a new
    interpretration to parameter names ending in an asterisk. As pointed out
    above, it's up to the specification for the non-extended parameter to "opt
    in" to the syntax defined here. That being said, some existing
    implementations are known to automatically switch to the use of this
    notation when a parameter name ends with an asterisk, thus using parameter
    names ending in an asterisk for something else is likely to cause
    interoperability problems.
  </t>
</list></t>

<section anchor="when.to.use.the.extension" title="When to Use the Extension">
<t>
  Section 4.2 of <xref target="RFC2277"/> requires that protocol
  elements containing human-readable text are able to carry language information. Thus, the <xref target="definition" format="none">ext-value</xref>
  production ought to be always used when the parameter value is of textual
  nature and its language is known.
</t>
<t>
  Furthermore, the extension ought to also be used whenever the parameter value
  needs to carry characters not present in the US-ASCII (<xref target="RFC0020"/>)
  coded character set (note that it would be unacceptable to define a new parameter that
  would be restricted to a subset of the Unicode character set).
</t>
</section>

<section title="Error Handling">
<t>
  Header field specifications need to define whether multiple
  instances of parameters with identical parmname components are allowed, and
  how they should be processed. This specification suggests that a parameter using the
  extended syntax takes precedence. This would allow producers to use both
  formats without breaking recipients that do not understand the extended syntax
  yet.
</t>
<figure><preamble>Example:</preamble><artwork type="example"><![CDATA[
  foo: bar; title="EURO exchange rates";
            title*=utf-8''%e2%82%ac%20exchange%20rates
]]></artwork><postamble>In this case, the sender provides an ASCII version of the title
  for legacy recipients, but also includes an internationalized version for
  recipients understanding this specification -- the latter obviously 
  ought to prefer the new syntax over the old one.</postamble></figure>
</section>
</section>

<section anchor="security.considerations" title="Security Considerations">
<t>
  The format described in this document makes it possible to transport
  non-ASCII characters, and thus enables character "spoofing" scenarios,
  in which a displayed value appears to be something other than it is.
</t>
<t>
  Furthermore, there are known attack scenarios relating to decoding UTF-8.
</t>
<t>
  See Section 10 of <xref target="RFC3629"/> for more information on
  both topics.
</t>
<t>
  In addition, the extension specified in this document makes it possible
  to transport multiple language variants for a single parameter, and such use might allow spoofing attacks, where
  different language versions of the same parameter are not equivalent.
  Whether this attack is useful as an attack depends on the parameter
  specified.
</t>
</section>  

<section anchor="iana.considerations" title="IANA Considerations">
<t>
  There are no IANA Considerations related to this specification.
</t>  
</section>

  </middle>
  <back>
  
<references title="Normative References">
  
  <reference anchor="RFC0020" target="http://www.rfc-editor.org/info/rfc20"><front>
      <title>ASCII format for network interchange</title>
      <author initials="V." surname="Cerf" fullname="Vint Cerf"/>
      <date year="1969" month="October"/>
    </front><seriesInfo name="STD" value="80"/><seriesInfo name="RFC" value="20"/><seriesInfo name="DOI" value="10.17487/RFC0020"/></reference>

  <reference anchor="RFC2119" target="http://www.rfc-editor.org/info/rfc2119"><front>
      <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
      <author initials="S." surname="Bradner" fullname="Scott Bradner"/>
      <date month="March" year="1997"/>
    </front><seriesInfo name="BCP" value="14"/><seriesInfo name="RFC" value="2119"/><seriesInfo name="DOI" value="10.17487/RFC2119"/></reference>

  <reference anchor="RFC2978" target="http://www.rfc-editor.org/info/rfc2978"><front>
      <title>IANA Charset Registration Procedures</title>
      <author initials="N." surname="Freed" fullname="N. Freed"/>
      <author initials="J." surname="Postel" fullname="J. Postel"/>
      <date year="2000" month="October"/>
    </front><seriesInfo name="BCP" value="19"/><seriesInfo name="RFC" value="2978"/><seriesInfo name="DOI" value="10.17487/RFC2978"/></reference>

  <reference anchor="RFC3629" target="http://www.rfc-editor.org/info/rfc3629"><front>
      <title>UTF-8, a transformation format of ISO 10646</title>
      <author initials="F." surname="Yergeau" fullname="F. Yergeau"/>
      <date month="November" year="2003"/>
    </front><seriesInfo name="STD" value="63"/><seriesInfo name="RFC" value="3629"/><seriesInfo name="DOI" value="10.17487/RFC3629"/></reference>
  
  <reference anchor="RFC3986" target="http://www.rfc-editor.org/info/rfc3986"><front>
    <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
    <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee"/>
    <author initials="R." surname="Fielding" fullname="Roy T. Fielding"/>
    <author initials="L." surname="Masinter" fullname="Larry Masinter"/>
    <date month="January" year="2005"/>
   </front><seriesInfo name="STD" value="66"/><seriesInfo name="RFC" value="3986"/><seriesInfo name="DOI" value="10.17487/RFC3986"/></reference>

  <reference anchor="RFC5646" target="http://www.rfc-editor.org/info/rfc5646"><front>
      <title>Tags for Identifying Languages</title>
      <author initials="A." surname="Phillips" fullname="Addison Phillips" role="editor"/>
      <author initials="M." surname="Davis" fullname="Mark Davis" role="editor"/>
      <date month="September" year="2009"/>
    </front><seriesInfo name="BCP" value="47"/><seriesInfo name="RFC" value="5646"/><seriesInfo name="DOI" value="10.17487/RFC5646"/></reference>

  <reference anchor="RFC5234" target="http://www.rfc-editor.org/info/rfc5234"><front>
      <title abbrev="ABNF for Syntax Specifications">Augmented BNF for Syntax Specifications: ABNF</title>
      <author initials="D." surname="Crocker" fullname="Dave Crocker" role="editor"/>
      <author initials="P." surname="Overell" fullname="Paul Overell"/>
      <date month="January" year="2008"/>
    </front><seriesInfo name="STD" value="68"/><seriesInfo name="RFC" value="5234"/><seriesInfo name="DOI" value="10.17487/RFC5234"/></reference>


    <reference anchor="RFC7230" target="http://www.rfc-editor.org/info/rfc7230"><front>
        <title>
        Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
        <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding"/>
        <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke"/>
        <date month="June" year="2014"/>
      </front><seriesInfo name="RFC" value="7230"/><seriesInfo name="DOI" value="10.17487/RFC7230"/></reference>

    <reference anchor="RFC7231" target="http://www.rfc-editor.org/info/rfc7231"><front>
        <title>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</title>
        <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding"/>
        <author fullname="Julian F. Reschke" initials="J. F." role="editor" surname="Reschke"/>
        <date month="June" year="2014"/>
      </front><seriesInfo name="RFC" value="7231"/><seriesInfo name="DOI" value="10.17487/RFC7231"/></reference>

</references>
  
<references title="Informative References">

  <reference anchor="Err1912" target="http://www.rfc-editor.org"><front>
      <title>Errata ID 1912, RFC 2978</title>
      <author>
        <organization>RFC Errata</organization>
      </author>
      <date year="2009" month="October"/>
    </front></reference>

  <reference anchor="ISO-8859-1"><front>
      <title>Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1</title>
      <author>
        <organization>International Organization for Standardization</organization>
      </author>
      <date year="1998"/>
    </front><seriesInfo name="ISO/IEC" value="8859-1:1998"/></reference>

  <reference anchor="RFC2045" target="http://www.rfc-editor.org/info/rfc2045"><front>
      <title abbrev="Internet Message Bodies">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</title>
      <author initials="N." surname="Freed" fullname="Ned Freed"/>
      <author initials="N.S." surname="Borenstein" fullname="Nathaniel S. Borenstein"/>
      <date month="November" year="1996"/>
    </front><seriesInfo name="RFC" value="2045"/><seriesInfo name="DOI" value="10.17487/RFC2045"/></reference>

  <reference anchor="RFC2047" target="http://www.rfc-editor.org/info/rfc2047"><front>
      <title abbrev="Message Header Extensions">MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text</title>
      <author initials="K." surname="Moore" fullname="Keith Moore"/>
      <date month="November" year="1996"/>
    </front><seriesInfo name="RFC" value="2047"/><seriesInfo name="DOI" value="10.17487/RFC2047"/></reference>

  <reference anchor="RFC2231" target="http://www.rfc-editor.org/info/rfc2231"><front>
      <title abbrev="MIME Value and Encoded Word Extensions">MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations</title>
      <author initials="N." surname="Freed" fullname="Ned Freed"/>
      <author initials="K." surname="Moore" fullname="Keith Moore"/>
      <date year="1997" month="November"/>
    </front><seriesInfo name="RFC" value="2231"/><seriesInfo name="DOI" value="10.17487/RFC2231"/></reference>

  <reference anchor="RFC2277" target="http://www.rfc-editor.org/info/rfc2277"><front>
      <title abbrev="Charset Policy">IETF Policy on Character Sets and Languages</title>
      <author initials="H.T." surname="Alvestrand" fullname="Harald Tveit Alvestrand"/>
      <date year="1998" month="January"/>
    </front><seriesInfo name="BCP" value="18"/><seriesInfo name="RFC" value="2277"/><seriesInfo name="DOI" value="10.17487/RFC2277"/></reference>

  <reference anchor="RFC2616" target="http://www.rfc-editor.org/info/rfc2616"><front>
      <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
      <author initials="R." surname="Fielding" fullname="R. Fielding"/>
      <author initials="J." surname="Gettys" fullname="J. Gettys"/>
      <author initials="J." surname="Mogul" fullname="J. Mogul"/>
      <author initials="H." surname="Frystyk" fullname="H. Frystyk"/>
      <author initials="L." surname="Masinter" fullname="L. Masinter"/>
      <author initials="P." surname="Leach" fullname="P. Leach"/>
      <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee"/>
      <date month="June" year="1999"/>
    </front><seriesInfo name="RFC" value="2616"/><seriesInfo name="DOI" value="10.17487/RFC2616"/></reference>
  
  <reference anchor="RFC5987" target="http://www.rfc-editor.org/info/rfc5987"><front>
      <title>Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters</title>
      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke"/>
      <date month="August" year="2010"/>
    </front><seriesInfo name="RFC" value="5987"/><seriesInfo name="DOI" value="10.17487/RFC5987"/></reference>

  <reference anchor="RFC5988" target="http://www.rfc-editor.org/info/rfc5988"><front>
      <title>Web Linking</title>
      <author fullname="Mark Nottingham" initials="M." surname="Nottingham"/>
      <date month="October" year="2010"/>
    </front><seriesInfo name="RFC" value="5988"/><seriesInfo name="DOI" value="10.17487/RFC5988"/></reference>

  <reference anchor="RFC6266" target="http://www.rfc-editor.org/info/rfc6266"><front>
      <title abbrev="Content-Disposition in HTTP">Use of the Content-Disposition Header Field
      in the Hypertext Transfer Protocol (HTTP)</title>
      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke"/>
      <date month="June" year="2011"/>
    </front><seriesInfo name="RFC" value="6266"/><seriesInfo name="DOI" value="10.17487/RFC6266"/></reference>

  <reference anchor="RFC6365" target="http://www.rfc-editor.org/info/rfc6365"><front>
      <title>Terminology Used in Internationalization in the IETF</title>
      <author initials="P." surname="Hoffman" fullname="P. Hoffman"/>
      <author initials="J." surname="Klensin" fullname="J. Klensin"/>
      <date year="2011" month="September"/>
    </front><seriesInfo name="BCP" value="166"/><seriesInfo name="RFC" value="6365"/><seriesInfo name="DOI" value="10.17487/RFC6365"/></reference>

  <reference anchor="RFC7578" target="http://www.rfc-editor.org/info/rfc7578"><front>
      <title>Returning Values from Forms: multipart/form-data</title>
      <author initials="L." surname="Masinter" fullname="Larry Masinter"/>
      <date year="2015" month="July"/>
    </front><seriesInfo name="RFC" value="7578"/><seriesInfo name="DOI" value="10.17487/RFC7578"/></reference>

  <reference anchor="RFC7616" target="http://www.rfc-editor.org/info/rfc7616"><front>
      <title>HTTP Digest Access Authentication</title>
      <author initials="R." surname="Shekh-Yusef" fullname="R. Shekh-Yusef" role="editor"/>
      <author initials="D." surname="Ahrens" fullname="D. Ahrens"/>
      <author initials="S." surname="Bremer" fullname="S. Bremer"/>
      <date year="2015" month="September"/>
    </front><seriesInfo name="RFC" value="7616"/><seriesInfo name="DOI" value="10.17487/RFC7616"/></reference>

  <reference anchor="XMLHttpRequest" target="http://www.w3.org/TR/2014/WD-XMLHttpRequest-20140130/"><front>
      <title>XMLHttpRequest Level 1</title>
      <author fullname="Anne van Kesteren" surname="van Kesteren" initials="A."/>
      <author fullname="Julian Aubourg" surname="Aubourg" initials="J."/>
      <author fullname="Jungkee Song" surname="Song" initials="J."/>
      <author fullname="Hallvord Steen" surname="Steen" initials="H."/>
      <date year="2014" month="January" day="30"/>
    </front><seriesInfo name="W3C Working Draft" value="WD-XMLHttpRequest-20140130"/><annotation>
      Latest version available at
      <eref target="http://www.w3.org/TR/XMLHttpRequest/"/>.
    </annotation></reference>

</references>


<section anchor="changes.from.rfc5987" title="Changes from RFC 5987">
<t>
  This section summarizes the changes compared to <xref target="RFC5987"/>:
</t>
<t><list style="symbols">
  <t>
    The document title was changed to "Indicating Character Encoding and Language for HTTP Header Field Parameters".
  </t>
  <t>
    The introduction was rewritten to better explain the issues around non-ASCII characters in field values.
  </t>
  <t>
    The requirement to support the "ISO-8859-1" encoding was removed.
  </t>
  <t>
    The document does not attempt to re-define a generic "parameter" ABNF anymore (it turned out that
    there really isn't a generic definition of parameters in HTTP; for instance, 
    there are subtle differences with respect to whitespace handling).
  </t>
  <t>
    A note about defects in error handling in current implementations was removed, as it wasn't accurate anymore.
  </t>
</list></t>
</section>


<section anchor="implementation.report" title="Implementation Report">
<t>
  The encoding defined in this document currently is used for two different
  HTTP header fields:
</t>
<t><list style="symbols">
  <t>
    "Authorization" (as used in HTTP Digest Authentication, defined in <xref target="RFC7616"/>),
  </t>
  <t>
    "Content-Disposition", defined in <xref target="RFC6266"/>, and
  </t>
  <t>
    "Link", defined in <xref target="RFC5988"/>.
  </t>
</list></t>
<t>
  As the encoding is a profile/clarification of the one defined in
  <xref target="RFC2231"/> in 1997, many user agents already supported it for
  use in "Content-Disposition" when <xref target="RFC5987"/> got published.
</t>
<t>
  Since the publication of <xref target="RFC5987"/>, three more popular desktop
  user agents have added support for this encoding; see 
  <eref target="http://purl.org/NET/http/content-disposition-tests#encoding-2231-char"/>
  for details. At this time, the current versions of all major desktop
  user agents support it.
</t>
<t>
  Note that the implementation in Internet Explorer 9 does not support the
  ISO-8859-1 character encoding; this document revision acknowledges that UTF-8 is
  sufficient for expressing all code points, and removes the requirement
  to support ISO-8859-1.
</t>
<t>
  The "Link" header field, on the other hand, was more recently specified
  in <xref target="RFC5988"/>. At the time of this writing, no User Agent
  except Firefox supported the "title*" parameter (starting with release 15).
</t>
<t>
  Section 3.4 of <xref target="RFC7616"/> defines the "username*" 
  parameter for use in HTTP Digest Authentication. At the time of writing, no
  User Agent implemented this extension.
</t>
</section>

<section anchor="change.log" title="Change Log (to be removed by RFC Editor before publication)">
<section title="Since RFC5987">
<t>
  Only editorial changes for the purpose of starting the revision process
  (obs5987).
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-00">
<t>
  Resolved issues "iso-8859-1" and "title" (title simplified).
  Added and resolved issue "historic5987".
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-01">
<t>
  Added issues "httpbis", "parmsyntax",
  "terminology" and "valuesyntax".
  Closed issue "impls".
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-02">
<t>
  Resolved issue "terminology".
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-03">
<t>
  In <xref target="character.set.and.language.information"/>, pull historical notes into a separate subsection.
  Resolved issues "valuesyntax" and "parmsyntax".
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-04">
<t>
  Update status of Firefox support in HTTP Link Header field.
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-05">
<t>
  Update status of Firefox support in HTTP Link Header field.
</t>
</section>

<section title="Since draft-reschke-rfc5987bis-06">
<t>
  Update status with respect to Safari 6.
</t>
<t>
  Started work on update with respect to RFC 723x. 
</t>
</section>

<section title="Since draft-ietf-httpbis-rfc5987bis-00">
<t>
  Editorial changes; introducing non-ASCII characters into author's
  address, acknowledgements, and examples.
</t>
</section>

<section title="Since draft-ietf-httpbis-rfc5987bis-01">
<t>
  Removed mention of RFC 2616 from Abstract and Introduction.
</t>
<t>
  Reference RFC 20 for US-ASCII.
</t>
<t>
  Do not attempt to define a generic parameter ABNF; just concentrate on the
  parameter value syntax.
</t>
</section>

<section title="Since draft-ietf-httpbis-rfc5987bis-02">
<t>
  RFC 2388 -&gt; RFC 7578.
</t>
<t>
  Expand on the motivation (see <eref target="https://github.com/httpwg/http-extensions/issues/213"/>).
</t>
<t>
  Mention RFC 7616 in implementation report.
</t>
</section>
</section>

<section title="Acknowledgements">
<t>
  Thanks to Martin Dürst and Frank Ellermann for help figuring out ABNF details,
  to Graham Klyne and Alexey Melnikov for general review, to
  Chris Newman for pointing out an RFC 2231 incompatibility, and to
  Benjamin Carlyle, Roar Lauritzsen, Eric Lawrence, and James Manger for implementer's feedback.
</t>
</section>  

  </back>

</rfc>