[Qt-interest] UCS-2LE encoded content to QDomDocument?

Lingfa Yang lingfa at brandeis.edu
Sun Jan 18 03:04:32 CET 2009


Lingfa Yang wrote:
> Lingfa Yang wrote:
>> Hello,
>>
>> QDomDocument fails to set content which is UCS-2Little Endian encoded 
>> XML file.
>>
>>  QFile file(fileName);
>>  if (file.open(QIODevice::ReadOnly)) {
>>    QByteArray content = file.readAll();
>>    file.close();
>>      domDocument.setContent(content , false, &errorStr, &m_errorLine, 
>> &m_errorColumn);
>>    ...
>>  }
>>
>> Is there a quick fix?
>>
>> Thanks in advance,
>> Lingfa
>>
> Please find a sample file: "ucs-2le.xml" attached.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ucs-2le.xml
Type: text/xml
Size: 150 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090117/532b8706/attachment.xml 


More information about the Qt-interest-old mailing list