I am working on the exel parsing using python.
till now I have worked with english language but when I encounter the regional languages, I am getting the error.
example :
IR05 měsíční (monthly)
It gives me the error as
UnicodeEncodeError: 'ascii' codec can't encode character u'\u011b' in position 6: ordinal not in range(128)
how I can parse it and I can again write in same language in output files?
my code :
for j in val:
print 'j is - ', j
str(j).replace("'", "")
I am getting error at replace statement.
which is a unicode version of your original string (which was encoded in utf8).
Now you can compare it to your other string (from the file), which you decode (from utf8 or latin2 or a different format) and you can compare them.
now you can compare the two unicode strings:
To write the string into a file,
encodeit again: