Answer the question
In order to leave comments, you need to log in
How to properly display an archive file in Cyrillic on QuaZIP?
I am using QuaZIP in a project. I get a list of archive files through JlCompress::getFileList(zipFile);
, they are displayed as:
"ѓќ‘Ќ/‘Ў®а\u00ADЁЄЁ \u00AD ¬®\u00ADв ¦ ®Ў®а㤮ў \u00ADЁп/"
Answer the question
In order to leave comments, you need to log in
I accidentally solved the problem. I bring the code:
QTextDecoder *decoder = QTextCodec::codecForName("cp866")->makeDecoder(QTextCodec::IgnoreHeader);
QString badString = "ѓќ‘Ќ/‘Ў®а\u00ADЁЄЁ \u00AD ¬®\u00ADв ¦ ®Ў®а㤮ў \u00ADЁп/";
QString correctString = decoder->toUnicode(badString.toLocal8Bit());
qDebug() << correctString; //выведет "ГЭСН/Сборники на монтаж оборудования/"
QuaZip *zip = new QuaZip();
zip->setFileNameCodec("IBM866");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question