acentuation problem

Mauricio Inforçati mauricio.inforcati at
Tue Aug 12 17:02:30 CEST 2003

I am having problems with acentuation on python.
Before, I used to have win98 with python 2.2.3. Everything worked perfectly.
Now, I´ve updated my OS to Windows 2000 and have problems.
When I try to save on IDLE a script wich has portuguese acentuation on some strings (like "andré"), it desn´t let me save the file, with this error.

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python22\lib\lib-tk\", line 1316, in __call__
    return apply(self.func, args)
  File "C:\PYTHON22\Tools\idle\", line 128, in save
    if self.writefile(self.filename):
  File "C:\PYTHON22\Tools\idle\", line 151, in writefile
    chars = str(self.text.get("1.0", "end-1c"))
UnicodeError: ASCII encoding error: ordinal not in range(128)

Similarly, on SHELL I can not use acentuation either.
>>> a = 'andré'
UnicodeError: ASCII encoding error: ordinal not in range(128)

BUT, in a command line python, on the same OS, I can use acentuation normally, without using unicodes or escape characters.
[command line]

>>> a = 'andré'

Can anybody help me?

    Maurício Inforçati

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list