From e6e3bfead181594d050e8ebd02e8c08572ec5635 Mon Sep 17 00:00:00 2001 From: Nick Klauer Date: Mon, 4 Sep 2017 09:47:52 -0500 Subject: [PATCH 1/2] ensure encoding check is case-insensitive encoding will fail if it isn't 'UTF-8', resulting in encodings of 'utf-8' to fail, too... This normalizes it. --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index f9849662..86c46c3b 100644 --- a/config.py +++ b/config.py @@ -50,7 +50,7 @@ if not USE_COLOR: # dont show colors if USE_COLOR is False ANSI = {k: '' for k in ANSI.keys()} -if sys.stdout.encoding != 'UTF-8': +if sys.stdout.encoding.lower() != 'UTF-8': print('[X] Your system is running python3 scripts with a bad locale setting: {} (it should be UTF-8).'.format(sys.stdout.encoding)) print(' To fix it, add the line "export PYTHONIOENCODING=utf8" to your ~/.bashrc file (without quotes)') print('') From 6bc2be4c7085726007960709f5bae041e4439523 Mon Sep 17 00:00:00 2001 From: Nick Klauer Date: Mon, 4 Sep 2017 16:38:43 -0500 Subject: [PATCH 2/2] change case goodness me...:( --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 86c46c3b..c5721f3b 100644 --- a/config.py +++ b/config.py @@ -50,7 +50,7 @@ if not USE_COLOR: # dont show colors if USE_COLOR is False ANSI = {k: '' for k in ANSI.keys()} -if sys.stdout.encoding.lower() != 'UTF-8': +if sys.stdout.encoding.upper() != 'UTF-8': print('[X] Your system is running python3 scripts with a bad locale setting: {} (it should be UTF-8).'.format(sys.stdout.encoding)) print(' To fix it, add the line "export PYTHONIOENCODING=utf8" to your ~/.bashrc file (without quotes)') print('')