Try UTF-8 locale encoding

- setlocale didn't always try UTF-8, and on systems that only had UTF-8
  encoding of the selected locale, this would fail to change locale

Fixes #872
This commit is contained in:
Peter Šurda 2016-06-14 21:57:40 +02:00
parent 0dd54e606d
commit 65211703c0
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ def change_translation(locale):
QtGui.QApplication.installTranslator(qsystranslator)
lang = pythonlocale.normalize(l10n.getTranslationLanguage())
langs = [lang.split(".")[0] + "." + l10n.encoding, lang]
langs = [lang.split(".")[0] + "." + l10n.encoding, lang.split(".")[0] + "." + 'UTF-8', lang]
if 'win32' in sys.platform or 'win64' in sys.platform:
langs = [l10n.getWindowsLocale(lang)]
for lang in langs: