Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.12
-
None
-
da0d7f61c8 (qt/qtbase/dev) da0d7f61c8 (qt/tqtc-qtbase/dev) c0aa21734d (qt/tqtc-qtbase/6.2) a65f67f5ab (qt/qtbase/6.3) a65f67f5ab (qt/tqtc-qtbase/6.3) 1892763c8c (qt/qtbase/6.4) 1892763c8c (qt/tqtc-qtbase/6.4) ce27e6f022 (qt/tqtc-qtbase/5.15)
Description
Downstream bug: https://bugs.kde.org/show_bug.cgi?id=455255
We are loading the SVG XML by wrapping a QIODevice in QXmlInputSource, then loading it with QDomDocument::setContent. After calling QDomImplementation::setInvalidDataPolicy(QDomImplementation::DropInvalidChars), QDomDocument::setContent strips non-BMP chars encoded in UTF-8 in the XML.
QDomDocument is loading the file as UTF-16 code units. In fixedCharData, it checks the code units one by one, using QXmlUtils::isChar which rejects half surrogates. This will, of course, strip all non-BMP code points.
Attachments
For Gerrit Dashboard: QTBUG-104362 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
417018,6 | QDom: Stop treating non-BMP characters as invalid | dev | qt/qtbase | Status: MERGED | +2 | 0 |
417499,2 | QDom: Stop treating non-BMP characters as invalid | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
417500,2 | QDom: Stop treating non-BMP characters as invalid | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
417501,2 | QDom: Stop treating non-BMP characters as invalid | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
417502,9 | QDom: Stop treating non-BMP characters as invalid | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |