From 8a3ee1df485d2742f819267d5e2401af6f102cc8 Mon Sep 17 00:00:00 2001 From: IMGillusion Date: Wed, 9 Sep 2026 14:56:07 +0800 Subject: [PATCH] Map schwa U+0259 to "e" (closes #91) The surrounding schwa-family vowels in the same block (U+0258, U+025B-C) all map to "e"; U+0259 alone mapped to "@", a glyph substitution rather than a transliteration. Change the single data entry and add a regression test. --- tests/test_unidecode.py | 5 +++++ unidecode/x002.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_unidecode.py b/tests/test_unidecode.py index dc4e922..fe806cc 100644 --- a/tests/test_unidecode.py +++ b/tests/test_unidecode.py @@ -527,6 +527,11 @@ def test_degree(self): self.assertEqual(self.unidecode('\u2109'), self.unidecode('\u00b0F')) self.assertEqual(self.unidecode('\u2103'), self.unidecode('\u00b0C')) + def test_schwa(self): + # https://github.com/avian2/unidecode/issues/91 + self.assertEqual(self.unidecode('\u0259'), 'e') + self.assertEqual(self.unidecode('Balab\u0259yov'), 'Balabeyov') + class TestUnidecode(BaseTestUnidecode, unittest.TestCase): unidecode = staticmethod(unidecode) diff --git a/unidecode/x002.py b/unidecode/x002.py index 710942c..66a465b 100644 --- a/unidecode/x002.py +++ b/unidecode/x002.py @@ -88,7 +88,7 @@ 'd', # 0x56 'd', # 0x57 'e', # 0x58 -'@', # 0x59 +'e', # 0x59 '@', # 0x5a 'e', # 0x5b 'e', # 0x5c