fix: add utf-8 encoding in read-write files

This commit is contained in:
Sri CHaRan
2026-02-08 19:14:57 +05:30
parent 67ecf5f6a0
commit f84b279540
22 changed files with 79 additions and 71 deletions

View File

@@ -27,7 +27,8 @@ class TestIcuRuleLoader:
self.project_env = project_env
def write_config(self, content):
(self.project_env.project_dir / 'icu_tokenizer.yaml').write_text(dedent(content))
(self.project_env.project_dir / 'icu_tokenizer.yaml').write_text(
dedent(content), encoding='utf-8')
def config_rules(self, *variants):
content = dedent("""\
@@ -119,7 +120,7 @@ class TestIcuRuleLoader:
variants:
""")
transpath = self.project_env.project_dir / ('transliteration.yaml')
transpath.write_text('- "x > y"')
transpath.write_text('- "x > y"', encoding='utf-8')
loader = ICURuleLoader(self.project_env)
rules = loader.get_transliteration_rules()