qt5base-lts/tests/auto/corelib/codecs/qtextcodec
Mitch Curtis 86115848b5 Correctly detect HTML 5 charset attribute in QTextCodec::codecForHtml()
QTextCodec::codecForHtml currently fails to detect the charset for this
HTML:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1">
    <title>Test</title>
    </head>

This patch makes the detection of charsets more flexible, allowing for
the use of the HTML 5 charset attribute as well more terminator characters
("'", and ">").

I also added a *_data function for the unit tests.

Task-number: QTBUG-5451

Change-Id: I69fe4a04582f0d845cbbe9140a86a950fb7dc861
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2013-02-12 01:31:26 +01:00
..
echo Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
test Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
.gitattributes
.gitignore
korean.txt
QT4-crashtest.txt
qtextcodec.pro
tst_qtextcodec.cpp Correctly detect HTML 5 charset attribute in QTextCodec::codecForHtml() 2013-02-12 01:31:26 +01:00
utf8.txt