Unicode Problem

Seid Mohammed seidymam at gmail.com
Thu Oct 30 08:28:39 CET 2008


I am new to python.
I want to print Amharic character using the Python IDLE.
here goes somple code
==============================================================
>>> abebe = 'አበበ በሶ በላ'
>>> abebe
'\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0 \xe1\x89\xa0\xe1\x88\xb6
\xe1\x89\xa0\xe1\x88\x8b'
>>> print abebe
አበበ በሶ በላ
>>> abeba = ['አበበ','በሶ','በላ']
>>> abeba
['\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0', '\xe1\x89\xa0\xe1\x88\xb6',
'\xe1\x89\xa0\xe1\x88\x8b']
>>> print abeba
['\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0', '\xe1\x89\xa0\xe1\x88\xb6',
'\xe1\x89\xa0\xe1\x88\x8b']
>>> len(abebe)
23
========================
so my question is
1)why >>> abebe prints  '\xe1\x8a\xa0\xe1\x89\xa0\xe1\x89\xa0
\xe1\x89\xa0\xe1\x88\xb6 \xe1\x89\xa0\xe1\x88\x8b' instead of አበበ በሶ
በላ
2) why >>> print abeba don't print the expected አበበ በሶ በላ string
thanks a lot.
Seid M.


More information about the Python-list mailing list