[webkit-changes] cvs commit: WebCore/layout-tests/fast/encoding xml-utf-8-default-expected.txt xml-utf-8-default.xml

Darin darin at opensource.apple.com
Wed Sep 14 22:22:58 PDT 2005


darin       05/09/14 22:22:58

  Modified:    .        ChangeLog
               khtml/misc decoder.cpp
  Added:       layout-tests/fast/encoding xml-utf-8-default-expected.txt
                        xml-utf-8-default.xml
  Log:
          Reviewed, tweaked, and landed by Darin.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3809
            Should default to UTF-8 or UTF-16 for application/xml documents with omitted charset and encoding declaration
  
          Test cases added:
          * layout-tests/fast/encoding/xml-utf-8-default.xml: Added.
          * layout-tests/fast/encoding/xml-utf-8-default-expected.txt: Added.
  
          * khtml/misc/decoder.cpp: (Decoder::decode): Always set encoding when we see an XML header.
  
  Revision  Changes    Path
  1.125     +13 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- ChangeLog	15 Sep 2005 05:16:55 -0000	1.124
  +++ ChangeLog	15 Sep 2005 05:22:56 -0000	1.125
  @@ -1,3 +1,16 @@
  +2005-09-14  Alexey Proskuryakov  <ap at nypop.com>
  +
  +        Reviewed, tweaked, and landed by Darin.
  +
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3809
  +          Should default to UTF-8 or UTF-16 for application/xml documents with omitted charset and encoding declaration
  +
  +        Test cases added:
  +        * layout-tests/fast/encoding/xml-utf-8-default.xml: Added.
  +        * layout-tests/fast/encoding/xml-utf-8-default-expected.txt: Added.
  +
  +        * khtml/misc/decoder.cpp: (Decoder::decode): Always set encoding when we see an XML header.
  +
   2005-09-14  Darin Adler  <darin at apple.com>
   
           * layout-tests/fast/dom/set-innerHTML-expected.txt: Updated test result now that DumpRenderTree handles
  
  
  
  1.43      +2 -0      WebCore/khtml/misc/decoder.cpp
  
  Index: decoder.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/misc/decoder.cpp,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- decoder.cpp	1 Sep 2005 05:37:17 -0000	1.42
  +++ decoder.cpp	15 Sep 2005 05:22:57 -0000	1.43
  @@ -524,6 +524,8 @@
                               if (m_type == EncodingFromXMLHeader)
                                   goto found;
                           }
  +                        setEncoding("UTF-8", EncodingFromXMLHeader);
  +                        goto found;
                       }
   
                       if(*ptr == '/') ptr++, end=true;
  
  
  
  1.1                  WebCore/layout-tests/fast/encoding/xml-utf-8-default-expected.txt
  
  Index: xml-utf-8-default-expected.txt
  ===================================================================
  When dumped into a text file by the test controller, this needs to be viewed as UTF-8:
  
  This is an em dash, —, this is is a delta symbol, ∆, this is an uppercase pi, ∏, and this is a lowercase pi, π.
  
  
  
  
  
  1.1                  WebCore/layout-tests/fast/encoding/xml-utf-8-default.xml
  
  Index: xml-utf-8-default.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <body>
  <p>When dumped into a text file by the test controller, this needs to be viewed as UTF-8:</p>
  <p>This is an em dash, —, this is is a delta symbol, ∆, this is an uppercase pi, ∏, and this is a lowercase pi, π.</p>
  <script>if (window.layoutTestController) layoutTestController.dumpAsText();</script>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list