Message74134
Hum, the problem is that IDLE asks io.open() to detect the charset
whereas open() doesn't know the #coding: header. So if your locale is
ASCII, CP1252 or anything different of UTF-8, read the file will
fails.
I wrote a patch to detect the encoding. Python code (detect_encoding()
function) is based on PyTokenizer_FindEncoding() and get_coding_spec()
(from Parser/tokenizer.c). There is no existing Python function to
detect the encoding of a Python script? (a public function available
in a Python script) |
|
Date |
User |
Action |
Args |
2008-10-01 16:14:01 | vstinner | set | recipients:
+ vstinner |
2008-10-01 16:14:00 | vstinner | set | messageid: <1222877640.96.0.0472929328747.issue4008@psf.upfronthosting.co.za> |
2008-10-01 16:13:59 | vstinner | link | issue4008 messages |
2008-10-01 16:13:59 | vstinner | create | |
|