-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.0.0, 6.11
-
None
-
3
The code is converting between encodings back and forth. It's e.g. using QString::fromUtf8(QLocalePrivate::bcp47Name()) instead of QLocale::bcpName(), which internally already does the faster fromLatin1(), and centralized at that.
Further, all users of getWinLocaleName() do an immediate fromLatin1() on its result, but the function itself ends with a call to QString::toLatin1(). Granted, there's also a code path in that function that works on QByteArray. But said QByteArray comes from qgetenv() and there's qEnvironmentVariable() (and it is my understanding that on Windows that one is preferable because the environment is in UTF-16 already).