Imitate QTextCodec::codecForLocale().

This commit is contained in:
Roman Telezhynskyi 2023-02-28 10:14:14 +02:00
parent 934781660a
commit 94f88b1066

View File

@ -1265,7 +1265,7 @@ auto VDxfEngine::FromUnicodeToCodec(const QString &str, VTextCodec *codec) -> st
auto VDxfEngine::GetFileNameForLocale() const -> std::string auto VDxfEngine::GetFileNameForLocale() const -> std::string
{ {
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
return VDxfEngine::FromUnicodeToCodec(m_fileName, QTextCodec::codecForLocale()); return VDxfEngine::FromUnicodeToCodec(m_fileName, VTextCodec::codecForName("System"));
#else #else
return m_fileName.toStdString(); return m_fileName.toStdString();
#endif #endif