From: Michael Tremer Date: Fri, 2 Jan 2026 13:22:05 +0000 (+0000) Subject: sources: Parse any byte-order marks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bf6b89d42635e24564a0dc4947bd76ae40852eb;p=dbl.git sources: Parse any byte-order marks https://en.wikipedia.org/wiki/Byte_order_mark Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index 3a41dcf..e0c33ea 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -387,7 +387,7 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): f = gzip.GzipFile(fileobj=f, mode="rb") # Convert into UTF-8 - f = io.TextIOWrapper(f, encoding="utf-8") + f = io.TextIOWrapper(f, encoding="utf-8-sig") return f