From f1a273134481b2230d83144cffd26046c031130e Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 13 Feb 2012 19:49:53 +0100 Subject: Just get rid off locale.getpreferredencoding. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn't do us any good and people should use UTF-8 anyway. Signed-off-by: Matěj Cepl --- json_diff.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/json_diff.py b/json_diff.py index b77cf3c..0866eba 100755 --- a/json_diff.py +++ b/json_diff.py @@ -32,9 +32,7 @@ import logging from optparse import OptionParser __author__ = "Matěj Cepl" -__version__ = "1.2.7" - -import locale +__version__ = "1.2.8" logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s', level=logging.INFO) @@ -358,7 +356,7 @@ def main(sys_args): print(unicode(HTMLFormatter(diff_res)).encode("utf-8")) else: outs = json.dumps(diff_res, indent=4, ensure_ascii=False) - print(outs.encode(locale.getpreferredencoding(do_setlocale=False))) + print(outs.encode("utf-8")) if len(diff_res) > 0: return 1 -- cgit