<?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>17839</bug_id>
          
          <creation_ts>2012-07-18 07:00:21 +0000</creation_ts>
          <short_desc>WebVTT: Update WebVTT to make use of the Encoding Standard</short_desc>
          <delta_ts>2013-07-12 02:05:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>TextTracks CG</product>
          <component>WebVTT</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></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>15332</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Silvia Pfeiffer">silviapfeiffer1</assigned_to>
          <cc>annevk</cc>
    
    <cc>contributor</cc>
    
    <cc>eoconnor</cc>
    
    <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>jirka</cc>
    
    <cc>lrosenth</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-texttracks</cc>
    
    <cc>silviapfeiffer1</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70148</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 07:00:21 +0000</bug_when>
    <thetext>This was was cloned from bug 16768 as part of operation convergence.
Originally filed: 2012-04-18 07:54:00 +0000
Original reporter: Anne &lt;annevk@annevk.nl&gt;

================================================================================
 #0   Anne                                            2012-04-18 07:54:33 +0000 
--------------------------------------------------------------------------------
The IANA registry is unbounded, does not match implementations when it comes to encodings and their labels, does not detail extensions to encodings that need to be supported, does not detail error handling for encodings; it is inadequate per today&apos;s standards. http://dvcs.w3.org/hg/encoding/raw-file/tip/Overview.html was written to solve this problem and using it in HTML we can simplify the following:

* Instead of &quot;preferred MIME name&quot; we can now talk about &quot;name&quot; of the &quot;encoding&quot;.
* &quot;ASCII-compatible character encoding&quot; is no longer needed as only utf-16 and utf-16be are incompatible per the restricted list.
* The &quot;decode a byte string as UTF-8, with error handling&quot; algorithm can be removed in favor of using &quot;utf-8 decode&quot; which has the correct error handling (should be identical).
* For encoding (URLs and &lt;form&gt;) a custom &quot;encoder error&quot; needs to be defined, by returning from the decoder algorithm and feeding it the intended replacement characters. (You do not know in advance which code points cannot be encoded.)
* In the suggested default encoding list the encoding names can be updated to use the canonical name rather than a label.
* Misinterpreted for compatibility is no longer needed and the encoding overrides table can also be removed.
================================================================================
 #1   Jirka Kosek                                     2012-04-18 11:05:14 +0000 
--------------------------------------------------------------------------------
Hi Anne,

thanks for draft.

Where are labels coming from? I&apos;m asking because if the aim of spec is to handle legacy content then additional labels should be added. For example windows-1250 was sometimes referred as cp1250 and you will find plenty of such pages in the wild.

Jirka
================================================================================
 #2   Anne                                            2012-04-18 11:31:55 +0000 
--------------------------------------------------------------------------------
The current draft is indeed rather conservative when it comes to single-byte labels (IE is the only browser that does not recognize that label as far as I can tell). I filed bug 16773 to change that.
================================================================================
 #3   Anne                                            2012-05-23 07:52:49 +0000 
--------------------------------------------------------------------------------
*** Bug 17151 has been marked as a duplicate of this bug. ***
================================================================================</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82009</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-01-24 01:38:45 +0000</bug_when>
    <thetext>Do you flag people using bytes that aren&apos;t compatible between ISO-8859-1 and Win1252 as a conformance error anywhere, or are we just saying ISO-8859-1 is bogus and these are the new tables, end of story?

I&apos;ve left references to &quot;ASCII-compatible character encoding&quot; for now; is it not still plausible that people are using EBCDIC mainframes and implementing HTML parsers for them?

The &quot;utf-8 decode&quot; and &quot;decode&quot; algorithms are too clever for HTML&apos;s use, so I just directly use the relevant decoder algorithms. &quot;encode&quot; doesn&apos;t seem to add anything useful vs &quot;encoder&quot;, either.

&gt; (You do not know in advance which code points cannot be encoded.)

Can you elaborate on this?


This patch is kinda long and I&apos;m not at all sure I got it all right, so if you see anything I missed don&apos;t hesitate to let me know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82010</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-01-24 01:39:06 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7647.
Check-in comment: Embrace the Encodings specification.
http://html5.org/tools/web-apps-tracker?from=7646&amp;to=7647</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82695</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-02-07 13:32:24 +0000</bug_when>
    <thetext>Basically, HTML now outlaws EBCDIC so I don&apos;t think we should account for that possibility. Just like specifications leave non-8-bit byte architectures as an exercise for the reader.


&gt; Can you elaborate on this?

What I meant is that knowing whether you can encoding a given code point or decode a given byte requires running through an algorithm that effectively attempts that operation. There&apos;s no concept of X can encode/decode set Y.


As for utf-8 decode. I was hoping we could end up with all specifications to use the same routine and same algorithm in the backend. By having HTML use utf-8 decode (and similar) that would be encouraged and would make it completely obvious that is in fact possible. (And if we then later need to tweak something there&apos;s only one place to do it, yadayadayada.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82736</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-02-08 03:16:17 +0000</bug_when>
    <thetext>I don&apos;t think having specs ignore real problems is a good policy. I&apos;m not at all convinced that there are no EBCDIC systems out there connected to the Web. If it&apos;s true that EBCDIC is dead, then great, but if it&apos;s only almost dead like XML, then we should still cater for it (like we do with XML).

Leaving open to see if I can move the BOM handling more to the encoding spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85156</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-29 18:45:22 +0000</bug_when>
    <thetext>I&apos;ve attempted to fix this for HTML, but WebVTT still needs fixing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85157</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-03-29 18:45:39 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7782.
Check-in comment: Strip a leading BOM from scripts in workers, if any. Also, use more of the encoding spec.
http://html5.org/tools/web-apps-tracker?from=7781&amp;to=7782</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85927</commentid>
    <comment_count>7</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-04-11 04:35:53 +0000</bug_when>
    <thetext>I assume it should go into the new version of the WebVTT spec.
So, just checking what needs to be changed.

Replace basically &quot;&lt;span&gt;decoded as UTF-8, with error handling&lt;/span&gt;&quot; with &quot;decoded using the &lt;span&gt;UTF-8 decoder&lt;/span&gt;&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85928</commentid>
    <comment_count>8</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-04-11 04:40:23 +0000</bug_when>
    <thetext>Hmm also probably: remove
   &lt;li&gt;&lt;p&gt;If the character indicated by &lt;var title=&quot;&quot;&gt;position&lt;/var&gt;
   is a U+FEFF BYTE ORDER MARK (BOM) character, advance &lt;var
   title=&quot;&quot;&gt;position&lt;/var&gt; to the next character in &lt;var
   title=&quot;&quot;&gt;input&lt;/var&gt;.&lt;/p&gt;&lt;/li&gt;
?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85931</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-04-11 05:44:20 +0000</bug_when>
    <thetext>Sylvia, yes, but you want to use http://encoding.spec.whatwg.org/#utf-8-decode rather than the utf-8 decoder. And then you can indeed remove the step about the BOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85932</commentid>
    <comment_count>10</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-04-11 05:48:59 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Sylvia, yes, but you want to use
&gt; http://encoding.spec.whatwg.org/#utf-8-decode rather than the utf-8 decoder.
&gt; And then you can indeed remove the step about the BOM.

Yes, that&apos;s what I meant. :-) Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85934</commentid>
    <comment_count>11</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-04-11 05:57:55 +0000</bug_when>
    <thetext>I am confused by the note in the WHATWG spec: &quot;The UTF-8 decoder is distinct from the UTF-8 decode algorithm. The latter first strips a Byte Order Mark (BOM), if any, and then invokes the former.&quot;

If I remove the BOM paragraph, I should then reference the &quot;UTF-8 decode algorithm&quot;, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85935</commentid>
    <comment_count>12</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-04-11 06:00:31 +0000</bug_when>
    <thetext>Yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85936</commentid>
    <comment_count>13</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-04-11 06:03:48 +0000</bug_when>
    <thetext>Good. Here we go:
https://dvcs.w3.org/hg/text-tracks/rev/27fcd202d32d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90662</commentid>
    <comment_count>14</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2013-07-12 02:05:23 +0000</bug_when>
    <thetext>Patch was applied as prepared.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>