mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix : control character cause qdomdocument can not parse attribute
This commit is contained in:
parent
3ed7ce5ccb
commit
9ea83f1299
|
@ -336,6 +336,9 @@ bool MdictParser::readHeader( QDataStream & in )
|
|||
headerTextUtf16.clear();
|
||||
in.setByteOrder( QDataStream::BigEndian );
|
||||
|
||||
//with this control character ,qt6.x can not parse attribute value.
|
||||
headerText.remove(QRegularExpression("\\p{C}"));
|
||||
|
||||
QDomNamedNodeMap headerAttributes = parseHeaderAttributes( headerText );
|
||||
|
||||
encoding_ = headerAttributes.namedItem( "Encoding" ).toAttr().value();
|
||||
|
|
Loading…
Reference in a new issue