I've added a .rc file with an xml document containing a list of unit conversions. Here's some code:
QFile rc
(":/data/units.xml");
{
qDebug() << "File Error: " << rc.errorString();
return;
}
qDebug() << "Start doc:";
qDebug() << stream.readAll();
qDebug() << "End doc";
rc.close();
QFile rc(":/data/units.xml");
if(!rc.open(QIODevice::ReadOnly))
{
qDebug() << "File Error: " << rc.errorString();
return;
}
QTextStream stream( &rc );
qDebug() << "Start doc:";
qDebug() << stream.readAll();
qDebug() << "End doc";
rc.close();
To copy to clipboard, switch view to plain text mode
After a certain point, a few random characters come out and the stream ends prematurely.
Start doc:
"<unitlist>
<!-- couple dozen lines of xml i wrote-->
<utype name="ti‘Ã’Ëi€End doc
Any idea what could be causing this?
Bookmarks