I have a string in Bangla and I'm trying to access characters by index.
# -*- coding: utf-8 -*-
bstr = "তরদজ"
print bstr # This line is working fine
for i in bstr:
print i, # question marks are printed
I don't know why it isn't working.
I have a string in Bangla and I'm trying to access characters by index.
# -*- coding: utf-8 -*-
bstr = "তরদজ"
print bstr # This line is working fine
for i in bstr:
print i, # question marks are printed
I don't know why it isn't working.
Turn it into unicode:
>>> bstr = "তরদজ"
>>> for i in bstr.decode('utf-8'):
... print i
...
ত
র
দ
জ