From 92e3e6264087f25c61684737f41811460dfa3f96 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Wed, 27 Apr 2016 10:07:49 +0200 Subject: [PATCH] Locale fix Date formatting sometimes didn't use the correct locale encoding --- src/bitmessageqt/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ce28b5e8..51d6fba5 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -106,6 +106,7 @@ def change_translation(locale): lang = pythonlocale.normalize(l10n.getTranslationLanguage()) try: pythonlocale.setlocale(pythonlocale.LC_ALL, lang) + l10n.encoding = pythonlocale.nl_langinfo(pythonlocale.CODESET) except: logger.error("Failed to set locale to %s", lang, exc_info=True)