mhajiloo / persiantools

Jalali date and datetime with other tools
MIT License
69 stars 5 forks source link

Accept unicode strings as input #10

Closed Huji closed 5 years ago

Huji commented 5 years ago

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

mhajiloo commented 5 years ago

It works now 🙏🏻