<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25227</bug_id>
          
          <creation_ts>2014-04-02 07:52:01 +0000</creation_ts>
          <short_desc>Typo: term &apos;encode&apos; used instead of &apos;decode&apos;</short_desc>
          <delta_ts>2014-04-11 14:10:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>URL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vyacheslav Matva">vmatva</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103261</commentid>
    <comment_count>0</comment_count>
    <who name="Vyacheslav Matva">vmatva</who>
    <bug_when>2014-04-02 07:52:01 +0000</bug_when>
    <thetext>application/x-www-form-urlencoded parser

Item 6.5 says:
&quot;If use _charset_ flag is set, name is `_charset_`, and get an encoding for value, encoded, does not return failure, unset use _charset_ flag and set encoding override to the result of getting an encoding for value, encoded.&quot;

It must say:
&quot;If use _charset_ flag is set, name is `_charset_`, and get an encoding for value, DECODED, does not return failure, unset use _charset_ flag and set encoding override to the result of getting an encoding for value, DECODED.&quot;

How it works as I understand it:
  1. We take &apos;value&apos; part from name-value pair where name is &quot;_charset_&quot;. It is byte sequence.
  2. Then we decode this sequence (i.e. we convert it from byte sequence to code point sequence).
  3. Then we try to get encoding by this string (method &apos;get an encding&apos; from Encoding spec). If getting encoding not fails then we use these encoding to decode other name-value pairs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103753</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-11 14:10:23 +0000</bug_when>
    <thetext>https://github.com/whatwg/url/commit/f7ab990492ff6f6f69b557b7693149f42bba6bd8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>