[Python-3000] Issues about Python script encoding
Victor Stinner
victor.stinner at haypocalc.com
Thu Oct 2 18:46:13 CEST 2008
Python3 traceback have bugs making debugging harder:
[Py3k] line number is wrong after encoding declaration
http://bugs.python.org/issue2384
PyTraceBack_Print() doesn't respect # coding: xxx header
http://bugs.python.org/issue3975
Both issues has patch + testcase.
--
About the coding header, IDLE doesn't read #coding: header. Here is a fix (use
tokenize.detect_encoding):
http://bugs.python.org/issue4008
And finally, two more patches for the encoding detecting in:
http://bugs.python.org/issue4016
-> use tokenize.detect_encoding() in linecache (instead of a duplicate
incomplete (eg. no UTF-8 BOM support) code to detect the encoding)
-> reuse codecs.BOM_UTF8 in tokenize
That's all for today :)
--
Victor Stinner aka haypo
http://www.haypocalc.com/blog/
More information about the Python-3000
mailing list