Skip to content
  • ap@webkit.org's avatar
    Reviewed by Eric Seidel. · a1b6f102
    ap@webkit.org authored
            https://bugs.webkit.org/show_bug.cgi?id=18681
            <rdar://problem/5888130> WebKit should not remove BOM characters from content.
    
            We were only trying to match Firefox, and it doesn't do this any more.
    
            Tests: fast/encoding/bom-in-content.html
                   fast/encoding/bom-in-content-utf16.html
    
            * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): Skip the BOM if it's
            at the start of input stream.
    
            * platform/text/TextCodec.cpp:
            * platform/text/TextCodec.h:
            * platform/text/TextCodecICU.cpp:
            (WebCore::TextCodecICU::decode):
            * platform/text/TextCodecUTF16.cpp:
            (WebCore::TextCodecUTF16::decode):
            * platform/text/mac/TextCodecMac.cpp:
            (WebCore::TextCodecMac::decode):
            Don't remove the BOM.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a1b6f102