[Idle-dev] Non 7bit ascii characters in IDLE

Kurt B. Kaiser kbk@shore.net
Tue, 04 Feb 2003 14:37:07 -0500


<mpe501@chello.se> writes:

> If i do something like:
> a =3D "=E4"
> IDLE will barf and say something along the lines of "Unicode Error: Ordin=
al error". If i use idlefork i get a bunch of errors the moment i type a no=
n 7bit ascii character:
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "E:\Program\Python22\lib\lib-tk\Tkinter.py", line 1300, in __call__
>     return apply(self.func, args)
>   File "E:\Program\Python22\lib\lib-tk\Tkinter.py", line 436, in callit
>     apply(func, args)
>   File "E:\PROGRAM\PYTHON22\Tools\idle\ColorDelegator.py", line 144, in r=
ecolorize
>     self.recolorize_main()
>   File "E:\PROGRAM\PYTHON22\Tools\idle\PyShell.py", line 121, in recolori=
ze_main
>     ColorDelegator.recolorize_main(self)
>   File "E:\PROGRAM\PYTHON22\Tools\idle\ColorDelegator.py", line 196, in r=
ecolorize_main
>     if value in ("def", "class"):
> UnicodeError: UTF-16 decoding error: truncated data
>
>
> This may be because of my configuration but the people at #python haven't=
 been able to help me so maybe it's a bug....
>
> Please CC any replies to me since i'm not subscribed to the list.

Using IDLEfork0.9a2 and Python2.2.1 if I enter=20

a =3D u"\u00e4"
print a

I get an 'a' with an umlaut on my W2K box, and \u00e4 on my Linux box,
which isn't set up with international fonts.

You might try going to Python 2.3 and applying IDLEfork patch 615312.

--
KBK