<?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>20923</bug_id>
          
          <creation_ts>2013-02-09 01:26:28 +0000</creation_ts>
          <short_desc>Need a crazy mode for the %-decoder</short_desc>
          <delta_ts>2013-04-09 19:24:07 +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>PC</rep_platform>
          <op_sys>All</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="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82814</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-02-09 01:26:28 +0000</bug_when>
    <thetext>Fragment identifier parsing in the HTML spec has this crazy thing:

  Let decoded fragid be the result of expanding any sequences of percent-encoded 
  octets in fragid that are valid UTF-8 sequences into Unicode characters as 
  defined by UTF-8. If any percent-encoded octets in that string are not valid 
  UTF-8 sequences (e.g. they expand to surrogate code points), then skip this step 
  and the next one.

Any chance of getting an algorithm for this somehow?

http://www.whatwg.org/specs/web-apps/current-work/#the-indicated-part-of-the-document</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82984</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-02-12 11:52:15 +0000</bug_when>
    <thetext>So the algorithm you want is:

1. Percent decode /input/ into /bytes/.

2. Run utf-8&apos;s decoder on /bytes/. If that emitted an encoder error, return input, otherwise return the result of running utf-8&apos;s decoder on /bytes/.

Isn&apos;t that simple enough to just put in the HTML specification?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83077</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-02-13 00:25:57 +0000</bug_when>
    <thetext>Sure, I can do it in the HTML spec if you like.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85824</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-04-09 19:24:07 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7796.
Check-in comment: Update integration with URL spec and Encoding spec.
http://html5.org/tools/web-apps-tracker?from=7795&amp;to=7796</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>