<?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>26347</bug_id>
          
          <creation_ts>2014-07-15 23:55:55 +0000</creation_ts>
          <short_desc>Suppress &quot;Internal encoding declaration ... disagrees with the actual encoding of the document (UTF-8)&quot; error when user uses &quot;Check by text input&quot;</short_desc>
          <delta_ts>2018-03-30 08:05:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Takeshi Kurosawa">kurosawa-takeshi</reporter>
          <assigned_to name="Michael[tm] Smith">mike+validator</assigned_to>
          <cc>mike</cc>
    
    <cc>taken.spc</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      <flag name="needinfo"
          id="60"
          type_id="3"
          status="-"
          setter="mike"
    />

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108977</commentid>
    <comment_count>0</comment_count>
    <who name="Takeshi Kurosawa">kurosawa-takeshi</who>
    <bug_when>2014-07-15 23:55:55 +0000</bug_when>
    <thetext>Nu Markup Checker reports an error &quot;Internal encoding declaration shift_jis disagrees with the actual encoding of the document (UTF-8)&quot; in following conditions.

1. Select &quot;Check by text input&quot;
2. Paste html which has non utf-8 encoding declaration.
3. Click &quot;Check&quot;

I think this error is not reasonable. Because

- Nu Markup Checker only accepts utf-8 input and user cannot change &quot;actual encoding of the document&quot;
- Nu Markup Checker reports a warning (Legacy encoding shift_jis used. Documents should use UTF-8.) for same document when user uses &quot;Check by file upload&quot;

W3C Markup Validator reports &quot;info&quot; in same condition. I think it is reasonable.
http://validator.w3.org/

&gt; Using Direct Input mode: UTF-8 character encoding assumed
&gt; Unlike the “by URI” and “by File Upload” modes, the “Direct Input” mode of the validator provides validated content in the form of characters pasted or typed in the validator&apos;s form field. This will automatically make the data UTF-8, and therefore the validator does not need to determine the character encoding of your document, and will ignore any charset information specified.

To recap, I think Nu Markup Checker should reports warning (same as &quot;file upload&quot;) or info (same as W3C Markup Validator).

Sample HTML:

&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;meta charset=&quot;shift_jis&quot;&gt;
&lt;title&gt;Shift_JIS&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Shift_JIS&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129124</commentid>
    <comment_count>1</comment_count>
    <who name="Takeshi Kurosawa">taken.spc</who>
    <bug_when>2018-03-30 08:05:55 +0000</bug_when>
    <thetext>The spec has changed to disallow encoding other than UTF-8. Reporting an error instead of warning is reasonable.

https://github.com/validator/validator/commit/261121e8a675d6e39ba09da402b20a375bbc44a2

I close this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>