<?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>22734</bug_id>
          
          <creation_ts>2013-07-19 09:46:16 +0000</creation_ts>
          <short_desc>How is the default character encoding determined to decode application/x-www-form-urlencoded payloads?</short_desc>
          <delta_ts>2013-09-13 22:32:54 +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>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#url-encoded-form-data</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>simon.sapin</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90980</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-07-19 09:46:16 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#url-encoded-form-data
Complete: http://www.whatwg.org/c#url-encoded-form-data
Referrer: 

Comment:
How is the default character encoding determined to decode
application/x-www-form-urlencoded payloads?

Posted from: 207.218.72.65
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91236</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-24 17:44:45 +0000</bug_when>
    <thetext>This appears to be defined here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#application/x-www-form-urlencoded-decoding-algorithm

Is that not sufficient?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91263</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Sapin">simon.sapin</who>
    <bug_when>2013-07-24 23:31:07 +0000</bug_when>
    <thetext>The way I’m reading this, the default character encoding is an input to the * decode application/x-www-form-urlencoded payloads* algorithm. My question is, how are the users of the algorithm (none of which appear to be in this spec) expected to pick an encoding?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91295</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-25 23:47:26 +0000</bug_when>
    <thetext>Oh, I see. My bad. I thought you meant how is the character encoding determined.

There&apos;s no good way to pick one. If you happen to know what encoding was likely to have been used, then you can set that (e.g. if your page is Win1252, and it has a form, and you are decoding the form results, then it&apos;s slightly more likely than not that the encoding is Win1252, so that&apos;d be a default worth using), but there&apos;s no real way to know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93320</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-09-12 21:28:04 +0000</bug_when>
    <thetext>Would it help if the spec said this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93370</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-09-13 22:32:45 +0000</bug_when>
    <thetext>I put that in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93371</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-09-13 22:32:54 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8183.
Check-in comment: Add more colour around application/x-www-form-urlencoded decoding.
http://html5.org/tools/web-apps-tracker?from=8182&amp;to=8183</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>