Message56502
| Author |
christian.heimes |
| Recipients |
brett.cannon, christian.heimes, gvanrossum |
| Date |
2007年10月16日.18:33:21 |
| SpamBayes Score |
0.008274022 |
| Marked as misclassified |
No |
| Message-id |
<471503ED.7010305@cheimes.de> |
| In-reply-to |
<1192557323.74.0.226441796675.issue1267@psf.upfronthosting.co.za> |
| Content |
Christian Heimes wrote:
> * removed unused import of open in initstdio()
> * fixed infinite loop in PyTokenizer_FindEncoding() by checking
> tok-done == E_OK
I found another bug in Python/import.c:call_find_method. The function
mustn't set an encoding of ftp->mode contains 'b' for binary.
if (strchr(fdp->mode, 'b') == NULL) {
/* Python text file, get encoding from tokenizer */
encoding = PyTokenizer_FindEncoding(fp);
encoding = (encoding != NULL) ? encoding :
PyUnicode_GetDefaultEncoding();
}
Christian |
|