<?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>16687</bug_id>
          
          <creation_ts>2012-04-10 16:28:56 +0000</creation_ts>
          <short_desc>iso-2022-kr decoder feedback</short_desc>
          <delta_ts>2013-08-23 10:36:01 +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>PC</rep_platform>
          <op_sys>Windows 3.1</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>
          <dependson>20599</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>pub-w3</cc>
          
          <qa_contact>sideshowbarker+encodingspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66573</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-04-10 16:28:56 +0000</bug_when>
    <thetext>Are you sure \n (0x1A) should switch to ASCII?   (Same comment as for ISO-2022-JP.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67353</commentid>
    <comment_count>1</comment_count>
    <who name="">pub-w3</who>
    <bug_when>2012-05-06 13:28:44 +0000</bug_when>
    <thetext>The following illustrates a number of ISO-2022-KR encoding errors:

&lt;p&gt;Space (&apos; &apos;) between two-byte sequences:  \x0EVP VPVP  VPVP VP\x0F
&lt;p&gt;Newline (&apos;\\n&apos;) between two-byte sequences:  \x0EVP\nVPVP\n\nVPVP\nVP\x0F
&lt;p&gt;Space (&apos; &apos;) inside two-byte sequences:  \x0EVPV PVP VPVP\x0F
&lt;p&gt;Newline (&apos;\\n&apos;) inside two-byte sequences:  \x0EVPV\nPVP\nVPVP\x0F

&lt;p&gt;Aligned escape sequence: \x0EVPVP\x1B\$)CVP\x0F
&lt;p&gt;Misaligned escape sequence: \x0EVPV\x1B\$)CPVP\x0F

&lt;p&gt;Aligned shift in: \x0EVPVP\x0FVP\x0F
&lt;p&gt;Misaligned shift in: \x0EVPV\x0FPVP\x0F

&lt;p&gt;Aligned shift out:    \x0EVPVP\x0EVP\x0F
&lt;p&gt;Misaligned shift out: \x0EVPV\x0EPVP\x0F

&lt;p&gt;Incomplete escape sequence:  VP\x1BVP\x1B\$VP\x1B\$)VP\x1B\$)CVP

&lt;p&gt;Aligned incomplete escape sequence: \x0EVPVP\x1B\$VPVP\x0F
&lt;p&gt;Misaligned incomplete escape sequence: \x0EVPV\x1B\$PVPVP\x0F


Testing in IE (no differences between IE6 and IE9), Opera, Safari and Firefox gives the following results:


Only Opera gets out of synch when a space appears between two-byte sequences.

Firefox and Opera do switch to ASCII when a newline is found in two-byte mode.  IE and Safari however remain in two-byte mode, and they have the same error handling.

All browsers recognise a misaligned shift-in (i.e., 0F as a trail byte in two-byte mode as a way of switching to one-byte mode).  The only divergence is that IE eats the following byte.

A misaligned shift-out or a misaligned escape sequence (ESC &apos;$&apos; &apos;)&apos; &apos;D&apos;) is ignored by IE.  Other browsers misalign/realign.

An incomplete escape sequence in ASCII mode is converted to characters byte by byte in IE and Firefox, starting with an escape character, and with no U+FFFD being inserted.  Perhaps this should not be an error at all.

An incomplete escape sequence in 2-byte mode makes Opera switch to ASCII mode.  All other browsers stay in 2-byte mode and have essentially the same error handling (at least for the example above).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67354</commentid>
    <comment_count>2</comment_count>
    <who name="">pub-w3</who>
    <bug_when>2012-05-06 13:31:04 +0000</bug_when>
    <thetext>Typo:  the escape sequence is ESC &apos;$&apos; &apos;)&apos; &apos;C&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92498</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-23 10:36:01 +0000</bug_when>
    <thetext>This is obsolete now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>