Help with Unicode? in Tkinter?

Sheila King sheila at spamcop.net
Sun Sep 2 01:35:28 EDT 2001


On Sun, 2 Sep 2001 00:18:54 -0400 (EDT), Ignacio Vazquez-Abrams
<ignacio at openservices.net> wrote in comp.lang.python in article
<mailman.999404342.13043.python-list at python.org>:

:I think that the problem is that you're using unicode strings instead of just
:strings. Here's what I got under Idle (Python 1.5.2 though):
:
:---
:>>> print string.join(map(chr, range(160, 256)), '')
: ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
:>>>
:---
:
:Try using just chr() instead of unichr().

FABULOUS!!!! It worked! Look:

Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> print chr(231)
ç
>>> 

:D

Very happy, now. :D

I don't know, why of all the other possible ways of combining the
commands, that one didn't occur to me as well.

Thanks, heaps!

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/





More information about the Python-list mailing list