Skip to content

Commit

Permalink
Merge pull request #36 from atf1206/auto_locale
Browse files Browse the repository at this point in the history
Allow python to use default locale instead of requiring GB
  • Loading branch information
komsit37 authored Sep 1, 2022
2 parents 761cc7b + 47eeb1a commit c4f98f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion q_routine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c4f98f6

Please sign in to comment.