From: Philippe Antoine Date: Thu, 2 Feb 2023 15:57:01 +0000 (+0100) Subject: framework: explicit utf-8 encoding for reading json X-Git-Tag: suricata-6.0.10^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeea655ee78953c67933f9fcbe8a6933cdff4a1a;p=thirdparty%2Fsuricata-verify.git framework: explicit utf-8 encoding for reading json As the default encoding is platform dependent --- diff --git a/run.py b/run.py index 2d744e38c..2319e339e 100755 --- a/run.py +++ b/run.py @@ -484,7 +484,7 @@ class FilterCheck: raise TestError("%s does not exist" % (json_filename)) count = 0 - with open(json_filename, "r") as fileobj: + with open(json_filename, "r", encoding="utf-8") as fileobj: for line in fileobj: event = json.loads(line) if self.match(event):