Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41998

[REG 4.8->5] QTextBrowser assumes that the content of document is utf-16 when charset=unicode is specified

    XMLWordPrintable

Details

    • 1abcc1cd3d1a8d04ccfd711c3293d0c671af3c78 (qtbase/5.4, 28.10.2014, 5.4)

    Description

      If there is following line in html file given to QTextBrowser, it seems to assume that the content is in UTF-16LE format. There are no text encodings named unicode [1], but at least on recent firefox and chromium browsers this is assumed to mean UTF-8. This may cause problems if one expects a file that displays normally in a browser to show up with random Chinese letters.

      <meta http-equiv="Content-Type" content="text/html; charset=unicode">
      

      HTML validators are emitting errors for using such, so this is invalid anyway, but should this line instead be ignored in this case?

      1. http://www.iana.org/assignments/character-sets/character-sets.xhtml

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes