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

QTextCodec::codecForHtml() fails to detect charset if content attribute appears before http-equiv attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.6.0
    • 4.5.2
    • GUI: Text handling
    • None

      QTextCodec::codecForHtml() assumes that the content attribute appears after the http-equiv attribute, and therefore fails to detect the charset specified for the HTML if this is not the case.

      Example HTML that codecForHtml() fails on:

      <html><head><meta content=\"text/html; charset=ISO-8859-15\" http-equiv=\"content-type\" /></head></html>

      Autotest added: http://qt.gitorious.org/qt/qt/commit/90f0facddb799640ef9e123a3fc222e6a758c7be

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

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes