diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2018-01-17 22:05:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-17 22:05:08 +0100 |
| commit | 4ad5e6ad4f1e5ce89eb7d1135ada712fdd9ce6b6 (patch) | |
| tree | 38b9bbabbdfc6a343be30ccdc519643ee6fccdc3 /searx/engines/currency_convert.py | |
| parent | 8511e64f350b4b31db314a5d74ef77dd5b97b5f3 (diff) | |
| parent | 829032f306cec8f6d109bfb037a01dc50ff87442 (diff) | |
Merge pull request #1148 from MarcAbonce/python3.5-fix
[fix] Read utf-8 files (settings, languages, currency) with Python3.5
Diffstat (limited to 'searx/engines/currency_convert.py')
| -rw-r--r-- | searx/engines/currency_convert.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.py index 34a9af678..9c1c2f7b3 100644 --- a/searx/engines/currency_convert.py +++ b/searx/engines/currency_convert.py @@ -4,6 +4,7 @@ import os import sys import unicodedata +from io import open from datetime import datetime if sys.version_info[0] == 3: @@ -94,7 +95,7 @@ def load(): global db current_dir = os.path.dirname(os.path.realpath(__file__)) - json_data = open(current_dir + "/../data/currencies.json", 'rb').read() + json_data = open(current_dir + "/../data/currencies.json", 'r', encoding='utf-8').read() db = json.loads(json_data) |