]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tokenizer/legacy_tokenizer.py
always state encoding when opening files in text mode
[nominatim.git] / nominatim / tokenizer / legacy_tokenizer.py
index 3b8f75692f964e9c2e84dc3ada92b156dd0afb7b..97ce6d16644cff6a19369c9db5a7a12af8387078 100644 (file)
@@ -255,7 +255,7 @@ class LegacyTokenizer(AbstractTokenizer):
                 @define('CONST_Max_Word_Frequency', {0.MAX_WORD_FREQUENCY});
                 @define('CONST_Term_Normalization_Rules', "{0.TERM_NORMALIZATION}");
                 require_once('{0.lib_dir.php}/tokenizer/legacy_tokenizer.php');
-                """.format(config)))
+                """.format(config)), encoding='utf-8')
 
 
     def _init_db_tables(self, config):