Re: Unicode Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc 'BlackJack' Rintsch

    Re: Unicode Problem

    On Thu, 30 Oct 2008 10:28:39 +0300, Seid Mohammed wrote:
    I am new to python.
    I want to print Amharic character using the Python IDLE. here goes
    somple code
    =============== =============== =============== =============== ==
    >>>abebe = 'አበበ በሶ በላ'
    >>>abebe
    '\xe1\x8a\xa0\x e1\x89\xa0\xe1\ x89\xa0 \xe1\x89\xa0\xe 1\x88\xb6
    \xe1\x89\xa0\xe 1\x88\x8b'
    >>>print abebe
    አበበ በሶ በላ
    >>>abeba = ['አበበ','በሶ','በላ'] abeba
    ['\xe1\x8a\xa0\x e1\x89\xa0\xe1\ x89\xa0', '\xe1\x89\xa0\x e1\x88\xb6',
    '\xe1\x89\xa0\x e1\x88\x8b']
    >>>print abeba
    ['\xe1\x8a\xa0\x e1\x89\xa0\xe1\ x89\xa0', '\xe1\x89\xa0\x e1\x88\xb6',
    '\xe1\x89\xa0\x e1\x88\x8b']
    >>>len(abebe)
    23
    =============== =========
    so my question is
    1)why >>abebe prints '\xe1\x8a\xa0\x e1\x89\xa0\xe1\ x89\xa0
    \xe1\x89\xa0\xe 1\x88\xb6 \xe1\x89\xa0\xe 1\x88\x8b' instead of አበበ በሶ በላ
    2) why >>print abeba don't print the expected አበበ በሶ በላ string thanks
    a lot.
    Because lists represent their content in the `repr()` form. So you, the
    programmer, can see what's really in there.

    Ciao,
    Marc 'BlackJack' Rintsch
Working...