<?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>18514</bug_id>
          
          <creation_ts>2012-08-09 23:43:41 +0000</creation_ts>
          <short_desc>Validator mixes up character encoding at the W20 warning</short_desc>
          <delta_ts>2012-08-11 13:09:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>HEAD</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>1.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Takeshi Kurosawa">kurosawa-takeshi</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>ville.skytta</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72004</commentid>
    <comment_count>0</comment_count>
    <who name="Takeshi Kurosawa">kurosawa-takeshi</who>
    <bug_when>2012-08-09 23:43:41 +0000</bug_when>
    <thetext>At the W20 warning:
- The encoding specified in the meta element is treated as the value in XML declaration.
- The encoding specified in the XML declaration is not shown.

For example, in case validating following html,

&lt;?xml version=&quot;1.0&quot; encoding=&quot;Shift_JIS&quot;?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;en&quot; xml:lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=Shift-JIS&quot; /&gt;
&lt;title&gt;Hello, World!&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Hello, World!&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;

the warning actually shown is below:

&gt; The character encoding specified in the XML declaration (shift-jis)
&gt; is different from the value in the &lt;meta&gt; element ().
&gt; I will use the value from the XML declaration (shift-jis) for this validation.

While expected is below:

&gt; The character encoding specified in the XML declaration (shift_jis)
&gt; is different from the value in the &lt;meta&gt; element (shift-jis).
&gt; I will use the value from the XML declaration(shift_jis) for this validation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72005</commentid>
    <comment_count>1</comment_count>
      <attachid>1171</attachid>
    <who name="Takeshi Kurosawa">kurosawa-takeshi</who>
    <bug_when>2012-08-09 23:44:29 +0000</bug_when>
    <thetext>Created attachment 1171
Patch 1.0 agaist mercurial tip</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72075</commentid>
    <comment_count>2</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2012-08-11 13:09:19 +0000</bug_when>
    <thetext>Applied, thanks.

http://dvcs.w3.org/hg/markup-validator/rev/ce162226b857</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1171</attachid>
            <date>2012-08-09 23:44:29 +0000</date>
            <delta_ts>2012-08-09 23:44:29 +0000</delta_ts>
            <desc>Patch 1.0 agaist mercurial tip</desc>
            <filename>validator_mixes_up_character_encoding.diff</filename>
            <type>text/plain</type>
            <size>511</size>
            <attacher name="Takeshi Kurosawa">kurosawa-takeshi</attacher>
            
              <data encoding="base64">ZGlmZiAtciAzNDI1MDI3ZjBkY2YgaHR0cGQvY2dpLWJpbi9jaGVjawotLS0gYS9odHRwZC9jZ2kt
YmluL2NoZWNrCVNhdCBKdWwgMjggMTI6NDk6NTUgMjAxMiArMDMwMAorKysgYi9odHRwZC9jZ2kt
YmluL2NoZWNrCUZyaSBBdWcgMTAgMDg6MzM6MTYgMjAxMiArMDkwMApAQCAtMzA4MSw4ICszMDgx
LDggQEAKICAgICB7CiAgICAgICAgICZhZGRfd2FybmluZygKICAgICAgICAgICAgICdXMjAnLAot
ICAgICAgICAgICAgeyAgIFcyMF9odHRwID0+ICRGaWxlLT57Q2hhcnNldH0tPntYTUx9LAotICAg
ICAgICAgICAgICAgIFcyMF94bWwgID0+ICRGaWxlLT57Q2hhcnNldH0tPntNRVRBfSwKKyAgICAg
ICAgICAgIHsgICBXMjBfeG1sICA9PiAkRmlsZS0+e0NoYXJzZXR9LT57WE1MfSwKKyAgICAgICAg
ICAgICAgICBXMjBfbWV0YSA9PiAkRmlsZS0+e0NoYXJzZXR9LT57TUVUQX0sCiAgICAgICAgICAg
ICB9CiAgICAgICAgICk7CiAgICAgICAgICRGaWxlLT57VGVudGF0aXZlfSB8PSBUX1dBUk47Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>