QtWebKit and windows-1251 encoding



  • Hi! I have a simple html file:

    <!DOCTYPE html>
    <html lang="ru">
        <head>
            <title>Encoding Test</title>
            <meta charset="windows-1251">
        </head>
        <body>
            Некоторый текст
        </body>
    </html>
    

    When I try to load it into QWebView I get ASSERTION FAILED:

    ASSERTION FAILED: strcmp(alias, name) == 0 || atomicName
    d:\qt_webkit_vs17\qtwk\source\webcore\platform\text\TextEncodingRegistry.cpp(177) : WebCore::addToTextEncodingNameMap
    

    When I remove <meta> tag, that file loads successfully, but QWebView treats it as encoded with Latin-1 encoding. Also, when I load any web page without <meta> tag but with Content-Type: text/html; charset-1251 in the headers, I get ASSERTION FAILED too.

    qWebKitVersion returns me 538.1. Can anyone check this behavior for themselves and explain me what is wrong with windows-1251 encoding?



  • It might be that QtWebKit is built without ICU support


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.