From 28d965856c94a828fa09e4b8d1a622db83b1e307 Mon Sep 17 00:00:00 2001
From: inso <insomniak.fr@gmaiL.com>
Date: Mon, 26 Feb 2018 08:15:07 +0100
Subject: [PATCH] Fix encoding

---
 src/sakia/constants.py | 4 ++--
 src/sakia/main.py      | 1 -
 tests/conftest.py      | 2 --
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/sakia/constants.py b/src/sakia/constants.py
index c1ad2bef..d5c59565 100644
--- a/src/sakia/constants.py
+++ b/src/sakia/constants.py
@@ -3,8 +3,8 @@ import yaml
 
 MAX_CONFIRMATIONS = 6
 
-with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r') as stream:
+with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r', encoding="utf-8") as stream:
     ROOT_SERVERS = yaml.load(stream)
 
-with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r') as stream:
+with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r', encoding="utf-8") as stream:
     G1_LICENCE = stream.read()
diff --git a/src/sakia/main.py b/src/sakia/main.py
index 36eaf101..187e850f 100755
--- a/src/sakia/main.py
+++ b/src/sakia/main.py
@@ -105,7 +105,6 @@ def exception_message(log_lines, exc_info):
 
 def main():
     # activate ctrl-c interrupt
-    locale.setlocale(locale.LC_ALL, 'C.UTF-8')
     signal.signal(signal.SIGINT, signal.SIG_DFL)
     sakia = QApplication(sys.argv)
 
diff --git a/tests/conftest.py b/tests/conftest.py
index 484755bd..c3df0702 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -21,8 +21,6 @@ from sakia.services import DocumentsService
 
 _application_ = []
 
-locale.setlocale(locale.LC_ALL, 'C.UTF-8')
-
 @pytest.yield_fixture
 def event_loop():
     qapplication = get_application()
-- 
GitLab