[diffoscope] 02/04: Also match unicode JSON files.

Chris Lamb chris at chris-lamb.co.uk
Wed Jan 24 03:45:02 CET 2018


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit f7ced27f52b974b8dac3354b3145637e3bc28f24
Author: Chris Lamb <lamby at debian.org>
Date:   Wed Jan 24 13:40:11 2018 +1100

    Also match unicode JSON files.
---
 diffoscope/comparators/json.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffoscope/comparators/json.py b/diffoscope/comparators/json.py
index 3221597..00edafc 100644
--- a/diffoscope/comparators/json.py
+++ b/diffoscope/comparators/json.py
@@ -32,7 +32,7 @@ class JSONFile(File):
             # Try fuzzy matching for JSON files
             is_text = any(
                 file.magic_file_type.startswith(x)
-                for x in ('ASCII text'),
+                for x in ('ASCII text', 'UTF-8 Unicode text'),
             )
             if is_text and not file.name.endswith('.json'):
                 if '{' not in f.read(10):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list