mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
qt-qui.cpp: set the locale codec to UTF-8 on Win32
This makes QFile::encodeName() work and filenames with special chars on Win32 can be opened again. Fixes #740 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3b5781508c
commit
9e4cc81068
1 changed files with 6 additions and 0 deletions
|
@ -136,6 +136,12 @@ void init_ui(void)
|
|||
QFile::setDecodingFunction(decodeUtf8);
|
||||
QFile::setEncodingFunction(encodeUtf8);
|
||||
#endif
|
||||
#else
|
||||
// for Win32 and Qt5 we try to set the locale codec to UTF-8.
|
||||
// this makes QFile::encodeName() work.
|
||||
#ifdef Q_OS_WIN
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForMib(106));
|
||||
#endif
|
||||
#endif
|
||||
QCoreApplication::setOrganizationName("Subsurface");
|
||||
QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
|
||||
|
|
Loading…
Add table
Reference in a new issue