Reputation: 21817
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.txt
How can i fix it?
Thank you.
Upvotes: 0
Views: 1079
Reputation: 2499
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
Upvotes: 2