<?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>25339</bug_id>
          
          <creation_ts>2014-04-14 10:30:21 +0000</creation_ts>
          <short_desc>[survey needed] Make hz-gb-2312 a label of the replacement encoding</short_desc>
          <delta_ts>2014-11-04 06:34:57 +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>Encoding</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=945215</see_also>
          <bug_file_loc>http://telemetry.mozilla.org/#release/28/DECODER_INSTANTIATED_HZ/saved_session/Firefox</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="Henri Sivonen">hsivonen</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>jsbell</cc>
    
    <cc>jshin</cc>
    
    <cc>mike</cc>
    
    <cc>www-international</cc>
          
          <qa_contact>sideshowbarker+encodingspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103808</commentid>
    <comment_count>0</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2014-04-14 10:30:21 +0000</bug_when>
    <thetext>HZ is an exceptionally dangerous encoding, because its escape sequence consists of printable ASCII characters. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=20886#c3 .

In Firefox 28, I constrained the inheritance of HZ, removed it from the UI so that it can&apos;t be chosen manually and added telemetry for counting sessions in which the HZ decoder has been instantiated.

Sessions in which the HZ decoder has been instantiated are very rare: such a session occurs less often than once in a million sessions. http://telemetry.mozilla.org/#release/28/DECODER_INSTANTIATED_HZ/saved_session/Firefox

This suggests that the utility of HZ is so small that it should be regarded mainly as an XSS attack vector and be mapped the replacement encoding.

I&apos;d be interested in hearing the perspective of developers of other browsers, Chrome especially, since Chrome has resisted the addition of useless or merely marginally useful encodings.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103809</commentid>
    <comment_count>1</comment_count>
    <who name="Jungshik Shin">jshin</who>
    <bug_when>2014-04-14 10:44:30 +0000</bug_when>
    <thetext>I meant to file this bug, but haven&apos;t managed to. I fully agree to the proposal to make HZ a replacement encoding. I don&apos;t see any reason to keep it as a regular encoding while turning ISO-2022-{KR,CN,CN-Ext} to replacement encodings. 

Google&apos;s statistics is also similar to what&apos;s obtained with Mozilla. (I don&apos;t remember the number at the moment).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103811</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-14 10:50:23 +0000</bug_when>
    <thetext>Can you please go ahead and make this change in Gecko and Chromium and report back here whether it&apos;s sticky?

I will add a note to hz-gb-2312 that it is considered for removal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103812</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-14 10:55:50 +0000</bug_when>
    <thetext>https://github.com/whatwg/encoding/commit/f7a855a39aa0ab96ce3b783957d8ff67e5f97851</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111827</commentid>
    <comment_count>4</comment_count>
    <who name="Jungshik Shin">jshin</who>
    <bug_when>2014-09-19 19:17:40 +0000</bug_when>
    <thetext>Blink made hz-gb-2312 as a replacement encoding. Sorry that I hven&apos;t reported sooner. 

See https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/wtf/text/TextCodecReplacement.cpp&amp;q=HZ-GB-2312%20file:%5C.cpp$&amp;sq=package:chromium&amp;l=28

and 

https://codereview.chromium.org/265973003</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111879</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-20 08:48:43 +0000</bug_when>
    <thetext>That&apos;s great, are we sure that will stick? If so, I can remove it from the Standard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112689</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-04 09:57:31 +0000</bug_when>
    <thetext>The fix landed in Gecko too. I updated the specification to say this will almost certainly be removed. Waiting for confirmation that this hit stable before completely removing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114417</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-01 16:59:01 +0000</bug_when>
    <thetext>jsbell, removal of this encoding shipped four days ago in Chrome M38 right? Seems it is time to remove this from the specification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114434</commentid>
    <comment_count>8</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-11-03 18:14:16 +0000</bug_when>
    <thetext>(In reply to Anne from comment #7)
&gt; jsbell, removal of this encoding shipped four days ago in Chrome M38 right?
&gt; Seems it is time to remove this from the specification.

I believe this went out in Chrome M37, actually.

(And M38 hit stable a month ago now.)

No bug reports due to making hz-gb-2312 a replacement alias have crossed my radar. Unless Jungshik has any additional data, it looks like it has &quot;stuck&quot; and agree we can add it to the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114435</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-03 18:30:12 +0000</bug_when>
    <thetext>https://github.com/whatwg/encoding/commit/27513dad60cc80270e28d776939746b040b45fd0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114470</commentid>
    <comment_count>10</comment_count>
    <who name="Jungshik Shin">jshin</who>
    <bug_when>2014-11-04 06:34:57 +0000</bug_when>
    <thetext>(In reply to Joshua Bell from comment #8)
&gt; (In reply to Anne from comment #7)
&gt; &gt; jsbell, removal of this encoding shipped four days ago in Chrome M38 right?
&gt; &gt; Seems it is time to remove this from the specification.
&gt; 
&gt; I believe this went out in Chrome M37, actually.
&gt; 
&gt; (And M38 hit stable a month ago now.)
&gt; 
&gt; No bug reports due to making hz-gb-2312 a replacement alias have crossed my
&gt; radar. Unless Jungshik has any additional data, it looks like it has &quot;stuck&quot;
&gt; and agree we can add it to the spec.

I haven&apos;t seen any report of an issue due to the change, either.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>