<?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>20182</bug_id>
          
          <creation_ts>2012-11-30 16:19:23 +0000</creation_ts>
          <short_desc>Adding a &quot;percent decode to bytes&quot; algorithm</short_desc>
          <delta_ts>2012-12-21 14:58:10 +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 3.1</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="Simon Sapin">simon.sapin</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>79192</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Sapin">simon.sapin</who>
    <bug_when>2012-11-30 16:19:23 +0000</bug_when>
    <thetext>The URL standard has a &quot;percent decode&quot; algorithm: http://url.spec.whatwg.org/#percent-encoded-bytes

Parsing data: URLs probably requires a &quot;percent decode to bytes&quot; algorithm that is the same as &quot;percent decode&quot; with the following changes:

* Remove the first step
* Replace the last step by &quot;Return bytes.&quot;

To avoid redundancy, &quot;percent decode&quot; can then be be re-defined as:

1. If &apos;&apos;encoding override&apos;&apos; is not given, set it to utf-8. [This step is unchanged]
2. Let &apos;&apos;bytes&apos;&apos; be the result of running &apos;&apos;percent decode to bytes&apos;&apos; on &apos;&apos;input&apos;&apos;.
3. Return the result of running encoding override&apos;s decoder on bytes. [This step is unchanged]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79195</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Sapin">simon.sapin</who>
    <bug_when>2012-11-30 16:42:47 +0000</bug_when>
    <thetext>The &quot;percent decode to bytes&quot; name is only a suggestion. Better ideas for names are welcome :)

After this is added, data: parsing should be updated:
http://wiki.whatwg.org/wiki/URL_schemes#data:_URLs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80489</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-21 14:33:11 +0000</bug_when>
    <thetext>Simon, I updated the URL Standard the other day to do this, but I cannot update the wiki anymore as the draft moved elsewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80490</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Sapin">simon.sapin</who>
    <bug_when>2012-12-21 14:58:10 +0000</bug_when>
    <thetext>Great, thanks.
http://simonsapin.github.com/data-urls/ is updated.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>