Open mbande opened 8 years ago
I have the same issue !
You have to add u
before the string detect(u'ض')
but what if the string is given by the user ?! how to deal with such use case ?
After few searches I've found this Stackoverflow post, you have to add these 3 lines of codes in your script
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
and convert the text to unicode
inputText = unicode(inputText)
for both Arabic_Presentation_Forms-A and Arabic_Presentation_Forms-B characters,
detect
function throws exception: