diff options
author | Matěj Cepl <mcepl@redhat.com> | 2012-02-13 19:49:53 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2012-02-13 19:58:30 +0100 |
commit | e98e114acc3634bee80021242be5e13d97a683c4 (patch) | |
tree | 93e576562369fc2d89e18304e319fc9b52605a17 | |
parent | 874630611034b4cd5f40364c02910c4c4055391b (diff) | |
download | json_diff-e98e114acc3634bee80021242be5e13d97a683c4.tar.gz |
Just get rid off locale.getpreferredencoding.
It doesn't do us any good and people should use UTF-8 anyway.
Signed-off-by: Matěj Cepl <mcepl@redhat.com>
-rw-r--r-- | NEWS.txt | 3 | ||||
-rwxr-xr-x | json_diff.py | 6 |
2 files changed, 5 insertions, 4 deletions
@@ -1,3 +1,6 @@ +1.2.8 2012-02-13 + * Give up on non-UTF-8 encoding for output. + 1.2.7 2012-01-18 * Yet another (hopefully the last) fix of the development website. We are on fedorahosted.org now. 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 |