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

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)
else:
l10n.encoding = pythonlocale.getlocale()[1]
except:
logger.error("Failed to set locale to %s", lang, exc_info=True)