diff --git a/homoglyphs_fork/core.py b/homoglyphs_fork/core.py index 25b60b1..4a1d8cd 100644 --- a/homoglyphs_fork/core.py +++ b/homoglyphs_fork/core.py @@ -125,7 +125,7 @@ def get_all(cls): class Homoglyphs: def __init__(self, categories=None, languages=None, alphabet=None, - strategy=STRATEGY_IGNORE, ascii_strategy=STRATEGY_IGNORE, + strategy=STRATEGY_IGNORE, ascii_strategy=STRATEGY_REMOVE, ascii_range=ASCII_RANGE): """ :param ascii_strategy: action to take on unmatched char when converting to ascii diff --git a/tests.py b/tests.py index b4426e4..93da26e 100644 --- a/tests.py +++ b/tests.py @@ -127,7 +127,10 @@ def test_ascii_strategy(self): ).to_ascii(u'ч') self.assertEqual(ss, []) - # this test is based on https://github.com/yamatt/homoglyphs/issues/4 + # these tests are based on https://github.com/yamatt/homoglyphs/issues/4 + ss = Homoglyphs().to_ascii('ß') + self.assertEqual(ss, []) + ss = Homoglyphs(ascii_strategy=STRATEGY_IGNORE).to_ascii('ß') self.assertEqual(ss, ['ß'])