Le Thursday 02 October 2008 22:32:43 Martin v. Löwis, vous avez écrit : > > About the coding header, IDLE doesn't read #coding: header. Here is a fix > > (use tokenize.detect_encoding): > > http://bugs.python.org/issue4008 > > Are you really sure about that? It did in the past.
Try IDLE in an ASCII terminal: python Tools/scripts/idle idle-3.0rc1-quits-when-run.py (the .py file is attached to the issue). IDLE use open(filename, 'r') without setting the encoding. io module is not aware of the #coding: header. The issue is maybe related to the terminal locale since IDLE uses a "locale encoding" (import IOBinding; IOBinding.encoding) which is marked as "deprecated" in IDLE source code. (We should use the bug tracker to discuss this issue) -- Victor Stinner aka haypo http://www.haypocalc.com/blog/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com