idle6.0 german umlauts (ascii > 128 Exception)

Gerrit Muller gerrit.muller at philips.com
Tue Nov 7 09:49:38 CET 2000


Walter,

IDLE is working for me with many of the french letters, u-umlaut i did
not use yet.

The version I use at home is the last 2.0 release before the final
release came out, on windows 95.

Here at work I use 2.0 final on windows NT. This produces the same shit
you see. However by creating the file in Notepad (sic), I am able to get
things running...:

file test.py:
a="""à, è, ì, ò, ù 
À, È, Ì, Ò, Ù	CTRL+` (ACCENT GRAVE), the letter
á, é, í, ó, ú, ý
Á, É, Í, Ó, Ú, Ý	CTRL+' (APOSTROPHE), the letter
â, ê, î, ô, û
Â, Ê, Î, Ô, Û	CTRL+SHIFT+^ (CARET), the letter
ã, ñ, õ
Ã, Ñ, Õ	CTRL+SHIFT+~ (TILDE), the letter
ä, ë, ï, ö, ü, ÿ 
Ä, Ë, Ï, Ö, Ü, ?	CTRL+SHIFT+: (COLON), the letter
å, Å	CTRL+SHIFT+@, a or A
æ, Æ	CTRL+SHIFT+&, a or A
?, ?	CTRL+SHIFT+&, o or O
ç, Ç	CTRL+, (COMMA), c or C
ð, Ð	CTRL+' (APOSTROPHE), d or D
ø, Ø	CTRL+/, o or O
¿	ALT+CTRL+SHIFT+?
¡	ALT+CTRL+SHIFT+!
ß	CTRL+SHIFT+&, s
"""
ctrl-F5 and printing in the interactive window gives:
>>> 
print a
à, è, ì, ò, ù 
À, È, Ì, Ò, Ù	CTRL+` (ACCENT GRAVE), the letter
á, é, í, ó, ú, ý
Á, É, Í, Ó, Ú, Ý	CTRL+' (APOSTROPHE), the letter
â, ê, î, ô, û
Â, Ê, Î, Ô, Û	CTRL+SHIFT+^ (CARET), the letter
ã, ñ, õ
Ã, Ñ, Õ	CTRL+SHIFT+~ (TILDE), the letter
ä, ë, ï, ö, ü, ÿ 
Ä, Ë, Ï, Ö, Ü, ?	CTRL+SHIFT+: (COLON), the letter
å, Å	CTRL+SHIFT+@, a or A
æ, Æ	CTRL+SHIFT+&, a or A
?, ?	CTRL+SHIFT+&, o or O
ç, Ç	CTRL+, (COMMA), c or C
ð, Ð	CTRL+' (APOSTROPHE), d or D
ø, Ø	CTRL+/, o or O
¿	ALT+CTRL+SHIFT+?
¡	ALT+CTRL+SHIFT+!
ß	CTRL+SHIFT+&, s

regards Gerrit

"Walter.Zettel" wrote:
> 
> No, there is no contradiction. The first experiment was in idle the second
> was in a dosshell.
> 
> I have tried it again (= restarted idle): it happend again. The trace says
> it is in:
> 
>   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)
> 
> codeop.py seems to be the problem.
> 
> What can I do? It is very important, cause I just started "mission python"
> at my company (which is a very big public employee in germany) and one
> argument was idle. (ok a small one, but it is difficult to get people on
> other (better) ways!)
> 
> --
> cu Walter
> 
> "Gerrit Muller" <gmuller at worldonline.nl> schrieb im Newsbeitrag
> news:8u72ci$2mp$1 at nereid.worldonline.nl...
> > Your last experiment contradicts the first message. I remember having the
> > same problem, when writing a program for my daughter to learn her French.
> At
> > first it didn't work, while a later try after restarting IDLE it simply
> > worked... I have the impression that TkInter sometimes keeps some
> > (nasty/faulty) state information screwing up all later attempts.
> Restarting
> > IDLE usually works.
> >
> > Gerrit
> >
> > Walter.Zettel heeft geschreven in bericht
> > <8u71mh$4pg$02$1 at news.t-online.com>...
> > >This is not acceptable for me.
> > >
> > >Python is able to handle umlauts:
> > >
> > >C:\home>bash
> > >~ $python
> > >Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
> > >Type "copyright", "credits" or "license" for more information.
> > >>>>
> > >>>> a='Ä'
> > >>>> print a
> > >Ä
> > >>>>
> > >
> > >The problem is not one of Python!
> > >
> > >Strings are as i see it connected bytes and it should not matter if the
> > >value is greater than 127.
> > >
> > >Anyone out there, who can solve my problem?
> > >
> > <---snip--->
> >
> > >>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 = 'Ä'
> > >
> > >
> > >
> > >
> >
> >

-- 
-------------------------------------------------------------------------
Gerrit Muller                Philips Research Laboratories Eindhoven
Building:   WLp 1 17                    Prof. Holstlaan 4
Phone: +31 40 27 45242               5656 AA  Eindhoven
Fax:   +31 40 2743741          The Netherlands
mailto:gerrit.muller at philips.com
http://www.extra.research.philips.com/natlab/sysarch/index.html



More information about the Python-list mailing list