From 500c1b7b59d98709d0f3fcd736e9abafd80f162e Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Thu, 7 Oct 2021 12:06:56 +0000
Subject: [PATCH] fixed UTF BOM

---
 helios/models.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helios/models.py b/helios/models.py
index acb73ba..c485a70 100644
--- a/helios/models.py
+++ b/helios/models.py
@@ -753,7 +753,7 @@ class VoterFile(models.Model):
       # we do this in a simple way: replace all \r with \n
       # then, replace all double \n with single \n
       # this should leave us with only \n
-      content = content.replace(b'\r',b'\n').replace(b'\n\n',b'\n')
+      content = content.replace(b'\r',b'\n').replace(b'\n\n',b'\n').decode("utf-8-sig").encode("utf-8")
 
       close = False
       voter_stream = io.BytesIO(content)
-- 
GitLab