我用以下方法,写入的内容老不对,为什么,希望大侠指点,谢谢!
QString tmpstr;
tmpstr = QString::fromLocal8Bit( "你现在好吗?" );
j = tmpstr.length();
i = myfile.writeBlock( (const char*)tmpstr.local8Bit(), j*2 );
------------------------------------------------------------------------------------
写入的字节数确实是j*2, 可是实际文件中的结果老是少于j*2,请大虾指点!
如何将unicode完完整整的写入文件,谢谢!
[ 此贴被XChinux在2008-07-18 13:48重新编辑 ]