消息 [71855]
The test_imp stuff has to do with PyTokenizer_FindEncoding().
imp.find_module() only opens the file, passes the file descriptor to
PyTokenizer_FindEncoding() and then returns a file object with the found
encoding.
Problem is that (as issue 3594 points out), PyTokenizer_FindEncoding()
always fails. That means it assumes only the raw encodings are okay.
With Latin-1 being one of them, it returns the file opened as Latin-1 as
is correct. Removing that case here means PyTokenizer_FindEncoding()
fails, and thus assumes only UTF-8 as a legitimate encoding and opens
the files with the UTF-8 encoding. It took a while to find these two
bugs obviously. =) |
|
| 日期 |
用户 |
动作 |
参数 |
| 2008-08-24 19:53:28 | brett.cannon | 修改 | recipients:
+ brett.cannon, loewis, benjamin.peterson |
| 2008-08-24 19:53:27 | brett.cannon | 修改 | messageid: <1219607607.92.0.657266435422.issue3574@psf.upfronthosting.co.za> |
| 2008-08-24 19:53:27 | brett.cannon | 链接 | issue3574 messages |
| 2008-08-24 19:53:26 | brett.cannon | 创建 | |
|