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:
parent
88678eab3a
commit
4013bd31fd
|
@ -110,6 +110,8 @@ def change_translation(locale):
|
||||||
pythonlocale.setlocale(pythonlocale.LC_ALL, lang)
|
pythonlocale.setlocale(pythonlocale.LC_ALL, lang)
|
||||||
if 'win32' not in sys.platform and 'win64' not in sys.platform:
|
if 'win32' not in sys.platform and 'win64' not in sys.platform:
|
||||||
l10n.encoding = pythonlocale.nl_langinfo(pythonlocale.CODESET)
|
l10n.encoding = pythonlocale.nl_langinfo(pythonlocale.CODESET)
|
||||||
|
else:
|
||||||
|
l10n.encoding = pythonlocale.getlocale()[1]
|
||||||
except:
|
except:
|
||||||
logger.error("Failed to set locale to %s", lang, exc_info=True)
|
logger.error("Failed to set locale to %s", lang, exc_info=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user