Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
13
-
Foundation PM Staging
Description
Charset parsing is done in at least
- QStringConverter::encodingForHtml()
- qtwebengine/src/core/net/url_request_custom_job_proxy.cpp in QtWebengine
- ...
Unconfirmed further hits:
- qtbase/src/corelib/io/qdataurl.cpp
- qtbase/src/gui/platform/darwin/qutimimeconverter.mm
- qtbase/src/gui/text/qcssparser.cpp (probably different syntax, so maybe not applicable)
- qtbase/src/gui/text/qtexthtmlparser.cpp (in a ### comment)
- qtbase/ src/plugins/platforms/xcb/qxcbmime.cpp
We should make the code from QtNetwork more accessible (move to _p.h), move it to QtCore (to satisfy dependency chain) and then port the other parsers to it, because the QtNetwork one is the only one that can actually parse the full RFC.
Note that some users (sometimes manually) parse HTML/XML attributes and others parse MIME headers. The QtNetwork code parses MIME, so it may be only partially applicable, and/or needs to be extended for other users.