RE: how to display unicode in a Label in Tkinter

Discussion in 'Python' started by Ben Last, Aug 17, 2004.

  1. Ben Last

    Ben Last Guest

    Ali wrote:
    > > So how I write in Arabic?


    Eric answered:
    > There must be another simpler way, based on the standard encoding
    > used when
    > using Arabic characters. But I don't know this encoding, so I
    > cannot help you
    > much here. I also don't know how you can input these characters
    > in a computer
    > (especially in a source file, where the character flow is from
    > left to right)


    The easiest way I have found to have Unicode strings is not to embed them in
    the source at all, because every so often I'll find that I've passed my
    source through a Python editor or tool that doesn't grok encodings and all
    my embedded characters have been mangled. Instead, I write the Unicode
    strings in an editor (such as the humble Notepad) that supports saving UTF8
    files, and save them that way, usually in a simple "keyword=value" format so
    that my Python code can open up the file, read in the strings, decode them
    from UTF-8 and there's your Unicode all available.

    To echo other comments, though, AFAIK, TkInter doesn't do non-Western
    languages very well, if at all. A contact of mine has reported more success
    with wxPython, but the projects I'm on now don't venture outside the Latin
    encodings, so I can't advise as to whether Arabic is supported.

    Having moaned somewhat there; I have to say that Python has about the sanest
    Unicode handling of any environment I've yet had to use in anger... I
    learned i18n in C on VAX/VMS systems, the hard way...

    regards
    ben
     
    Ben Last, Aug 17, 2004
    #1
    1. Advertising

  2. Ben Last

    Ali Guest

    So how about this:

    I open MS Word and use the Insert>Symbol method to insert the text I
    want then copy that into the python editor?
     
    Ali, Aug 17, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shapper
    Replies:
    2
    Views:
    769
    Scott Mitchell [MVP]
    May 7, 2005
  2. Josef K.

    <label><div></div></label> allowed?

    Josef K., May 20, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    13,743
    Josef K.
    May 22, 2005
  3. Ali
    Replies:
    5
    Views:
    431
    Jeff Epler
    Aug 17, 2004
  4. Jeff Epler
    Replies:
    1
    Views:
    536
  5. Knut Krueger
    Replies:
    8
    Views:
    332
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page