Time & date Windows encoding

On Windows, the encoding was always the default windows encoding and
didn't change when you use a language in BM that required a different
encoding. This affected mainly date & time in the received column and
the startup info on the network status tab.
This commit is contained in:
mailchuck 2016-04-29 22:03:54 +02:00 committed by Peter Surda
parent 88678eab3a
commit 4013bd31fd
1 changed files with 2 additions and 0 deletions

View File

@ -110,6 +110,8 @@ def change_translation(locale):
pythonlocale.setlocale(pythonlocale.LC_ALL, lang)
if 'win32' not in sys.platform and 'win64' not in sys.platform:
l10n.encoding = pythonlocale.nl_langinfo(pythonlocale.CODESET)
l10n.encoding = pythonlocale.getlocale()[1]
logger.error("Failed to set locale to %s", lang, exc_info=True)