开发者

Qt open file with cyrillic path

I need to open file with C++/Qt. I opened it, but if there is cyrillic symbols in the file path i get:

/home/shk/?????????/test开发者_C百科.txt

How can i fix it?

Thank you.


QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"))
tr(line.toAscii()) ( toUtf8 and toLatin1);

and

 QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"))
 tr(line.toAscii()) ( toUtf8 and toLatin1);

this maybe helpful

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜