idle6.0 german umlauts (ascii >128 Exception)

Dale Strickland-Clark dale at out-think.NOSPAMco.uk
Mon Nov 6 10:11:04 EST 2000


"Walter.Zettel" <Walter.Zettel at t-online.de> wrote:

>Hello,
>
>is this a Tk bug or an idle bug or have I missed to configure something?
>
>With Python1.5.2 I was able to use geman umlauts in idle. Now with Python2.0
>(on MS Windows, BeOpen-Python2.0.exe) I can not even save files with
>umlauts.
>
>If I want to save:
>
># test.py
>
>a='Ä'
>print a
>
>I get:
>
>>>> Exception in Tkinter callback
>Traceback (most recent call last):
>  File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__
>    return apply(self.func, args)
>  File "C:\Python20\Tools\idle\IOBinding.py", line 136, in save_as
>    if self.writefile(filename):
>  File "C:\Python20\Tools\idle\IOBinding.py", line 154, in writefile
>    f.write(chars)
>UnicodeError: ASCII encoding error: ordinal not in range(128)
>
>and if I try to type 'astr = "Ä"' in interactive mode (Python Shell):
>
>>>> Exception in Tkinter callback
>Traceback (most recent call last):
>  File "c:\python20\lib\lib-tk\Tkinter.py", line 1287, in __call__
>    return apply(self.func, args)
>  File "C:\Python20\Tools\idle\PyShell.py", line 579, in enter_callback
>    self.runit()
>  File "C:\Python20\Tools\idle\PyShell.py", line 598, in runit
>    more = self.interp.runsource(line)
>  File "C:\Python20\Tools\idle\PyShell.py", line 183, in runsource
>    return InteractiveInterpreter.runsource(self, source, filename)
>  File "c:\python20\lib\code.py", line 61, in runsource
>    code = compile_command(source, filename, symbol)
>  File "c:\python20\lib\codeop.py", line 61, in compile_command
>    code = compile(source, filename, symbol)
>UnicodeError: ASCII encoding error: ordinal not in range(128)
>astr = 'Ä'


I've just hit a very similar problem in 1.6. I'm not sure which
character it is yet but it's the same symptoms.
--
Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants





More information about the Python-list mailing list