<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>14338</bug_id>
          
          <creation_ts>2007-06-23 09:06:37 -0700</creation_ts>
          <short_desc>Safari 3.0.2 beta for windows detects wrong encoding</short_desc>
          <delta_ts>2007-10-05 05:15:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Tore B. Krudtaa">krudtaa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>mrowe</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6575</commentid>
    <comment_count>0</comment_count>
    <who name="Tore B. Krudtaa">krudtaa</who>
    <bug_when>2007-06-23 09:06:37 -0700</bug_when>
    <thetext>Why does Safari 3.0.2 beta for windows detect wrong encoding:

I&apos;m using this in the head section of the page:
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html&quot; charset=&quot;UTF-8&quot;&gt;

But Safari chooses to use &quot;Default&quot; text encoding.. (whatever that is)....
and the some of the letters are wrong.

If I do:
View -&gt; Text Encoding -&gt; Unicode (UTF-8)

Then the text gets okay, but why does the safari browser not detect it automatically?

It (the page) works in browsers like Firefox, IE, Opera, Netscape.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6555</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-23 12:28:03 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; I&apos;m using this in the head section of the page:
&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html&quot; charset=&quot;UTF-8&quot;&gt;

This is incorrect.  It should read:

&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;

&gt; It (the page) works in browsers like Firefox, IE, Opera, Netscape.

Do these other browsers support the &quot;charset&quot; attribute, or does this simply work &quot;by chance&quot; because they use a different default charset?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6557</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-06-23 12:32:54 -0700</bug_when>
    <thetext>Can you please provide a URL which demonstrates this issue?

The HTML snippet you provided:
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html&quot; charset=&quot;UTF-8&quot;&gt;

is not the correct syntax for what you are trying to accomplish.

Try:
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;

If you can provide a link that demonstrates the issue as well we may be able to handle the incorrect code snippet you provided.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6543</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-06-23 14:11:30 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; I&apos;m using this in the head section of the page:
&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html&quot; charset=&quot;UTF-8&quot;&gt;
&gt; 
&gt; But Safari chooses to use &quot;Default&quot; text encoding.. (whatever that is)....

  This is kinda sorta OK - Safari doesn&apos;t display the detected encoding. I think it&apos;s really unfortunate, but that&apos;s the current design. I think I filed a Radar for it, but I cannot find the number right now.

&gt; and the some of the letters are wrong.

  This would be a bug, but I couldn&apos;t reproduce it. WebKit is supposed to honor the charset declaration, even if it&apos;s written this way.

  Please provide an URL of a page where this fails, or attach a test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6500</commentid>
    <comment_count>4</comment_count>
    <who name="Tore B. Krudtaa">krudtaa</who>
    <bug_when>2007-06-24 01:27:21 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; I&apos;m using this in the head section of the page:
&gt; &gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html&quot; charset=&quot;UTF-8&quot;&gt;
&gt; 
&gt; This is incorrect.  It should read:
&gt; 
&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
&gt; 
&gt; &gt; It (the page) works in browsers like Firefox, IE, Opera, Netscape.
&gt; 
&gt; Do these other browsers support the &quot;charset&quot; attribute, or does this simply
&gt; work &quot;by chance&quot; because they use a different default charset?
&gt; 

Hi there.

Sorry, my fault but found another difference between Safari and the rest
of the browsers.

Have now changed the line to:
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;

So now safari is using the correct encoding.

BUT.... I originally had forgot to remove an ECHO line in my PHP script before
the doctype part in the page.

And that echo line still causes Safari to use wrong encoding and wrong characters, also with the corrected meta line.
The other browsers still show the page with correct encoding even with the ECHO line before the doctype line.

Anyway thanks for the meta line correction.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6486</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-24 07:21:49 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; BUT.... I originally had forgot to remove an ECHO line in my PHP script before
&gt; the doctype part in the page.
&gt; 
&gt; And that echo line still causes Safari to use wrong encoding and wrong
&gt; characters, also with the corrected meta line.
&gt; The other browsers still show the page with correct encoding even with the ECHO
&gt; line before the doctype line.

Please attach a test case (just the HTML output from the script) that demonstrates the issue.  Thanks!

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6049</commentid>
    <comment_count>6</comment_count>
    <who name="Nicholas Shanks">nickshanks</who>
    <bug_when>2007-06-27 14:55:11 -0700</bug_when>
    <thetext>More importantly, what Content‐Type header is your web server sending out?
the http‐equiv tag is ignored if the transport is HTTP and a Content‐Type header is provided. Perhaps you are not specifying the charset at all there?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6001</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-06-27 21:27:14 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; the http‐equiv tag is ignored if the transport is HTTP and a Content‐Type
&gt; header is provided. Perhaps you are not specifying the charset at all there?

This is not true. A charset specified in Content-Type HTTP header overrides one from a META, but a plain &quot;Content-Type: text/html&quot; doesn&apos;t disable META checking.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57841</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-05 05:15:02 -0700</bug_when>
    <thetext>No reply to a request for additional information in three months, closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>