From d8115e6f3dcb70aeb78c6d05a4f4da4d918f8a26 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 20 Jul 2024 19:33:09 +0200 Subject: [PATCH] dbi.FlatfileMapping: Fix listing records on Windows All other methods open the file as UTF-8, but this one still used the system's default. --- src/dbi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbi.py b/src/dbi.py index 33fa90fbd..335c19a67 100644 --- a/src/dbi.py +++ b/src/dbi.py @@ -253,7 +253,7 @@ class FlatfileMapping(MappingInterface): fd.close() def __iter__(self): - fd = open(self.filename) + fd = open(self.filename, encoding='utf8') fd.readline() # First line, nextId. for line in fd: (id, s) = self._splitLine(line)