The replace method in utils.py starts with checking if the input is of type string. This is not ideal because in python 2.x the strings are often of type unicode and that renders some of the functionalities of persiantools unusbale.
For instance, this won't work in persiantools:
digits.fa_to_en(u'۱۲۳۴')
This can be address by allowing the unicode data-type here
The
replace
method inutils.py
starts with checking if the input is of typestring
. This is not ideal because in python 2.x the strings are often of typeunicode
and that renders some of the functionalities of persiantools unusbale.For instance, this won't work in persiantools:
This can be address by allowing the
unicode
data-type here