aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS.txt3
-rwxr-xr-xjson_diff.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/NEWS.txt b/NEWS.txt
index 6742cc9..fabacd3 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -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