From 47eeb1a7f3d3692866fae3fa61ec68417eff6733 Mon Sep 17 00:00:00 2001 From: atf1206 Date: Sun, 20 Mar 2022 13:34:17 -0400 Subject: [PATCH] Allow python to use default locale instead of requiring GB --- q_routine.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/q_routine.py b/q_routine.py index 678f308..163b55c 100644 --- a/q_routine.py +++ b/q_routine.py @@ -12,7 +12,11 @@ #fix unicode encoding issue when rendering template with non-ascii string #see https://stackoverflow.com/questions/9942594/unicodeencodeerror-ascii-codec-cant-encode-character-u-xa0-in-position-20 -import os; import locale; os.environ["PYTHONIOENCODING"] = "utf-8"; myLocale=locale.setlocale(category=locale.LC_ALL, locale="en_GB.UTF-8"); +import os; +import locale; + +os.environ["PYTHONIOENCODING"] = "utf-8"; +myLocale=locale.setlocale(category=locale.LC_ALL, locale=""); #copy code from https://github.com/nickjj/sublime-text-3-packages/blob/master/Packages/Gutter%20Color/gutter_color.py def clear_and_reload_cache(force = False):