New submission from ledave123 <ledave...@yahoo.fr>:

I'm on Windows with cp1252 as the default encoding.
When I use -*- coding: c1252 -*- I get no problems.
When I use -*- coding: utf-8 -*- IDLE -r still opens the file with cp1252 
encoding.
Python.exe opens the file with utf-8 correctly.

I think the problem is in Python32\Lib\idlelib\PyShell.py line 585:
In class ModifiedInterpreter:

    def execfile(self, filename, source=None):
        "Execute an existing file"
        if source is None:
            source = open(filename, "r").read() # this is the bug IMHO

----------
components: IDLE
messages: 141081
nosy: ledave123
priority: normal
severity: normal
status: open
title: IDLE ignores -*- coding -*- with -r option
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12636>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to