#include #include #include #include using namespace std; int main(int argc, char **argv) { QCoreApplication a(argc, argv); const QString theAppPath = a.applicationDirPath(); QDir theDir( theAppPath ); QString thePath = theAppPath + QString::fromWCharArray (L"/1/å"); theDir.mkpath( thePath ); QDir baseDir(thePath); QString theTruePath = baseDir.absolutePath(); QFileInfoList theEntry = baseDir.entryInfoList(); QString theWrongPath = theEntry.at(0).absoluteFilePath(); if ( theTruePath == theWrongPath) { qDebug() << "match" << endl; qDebug() << theTruePath << endl; qDebug() << theWrongPath << endl; } else { qDebug() << "not match" << endl; qDebug() << "TruePath:" << endl << theTruePath << endl; qDebug() << "WrongPath:" << endl << theWrongPath << endl; const QChar wrongChar = theWrongPath.at( theWrongPath.size() - 1 ); qDebug() << wrongChar << endl; const QChar trueChar = theTruePath.at( theTruePath.size() - 1 ); qDebug() << trueChar << endl; QString fixedPath = theWrongPath.normalized( QString::NormalizationForm_D ); if( fixedPath == theTruePath) { qDebug() << "match after normalization" << endl; qDebug() << "fixedPath:" << endl << fixedPath << endl; } else { qDebug() << "not match after normalization" << endl; } } return 0; }