This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients loewis, vstinner
Date 2010-10-14.07:16:58
SpamBayes Score 1.6674303e-08
Marked as misclassified No
Message-id <1287040621.55.0.67360038173.issue10095@psf.upfronthosting.co.za>
In-reply-to
Content
We shouldn't need to reopen the file in the first place. If we already have a file handle, we can rewind it. Then the encoding of the file name becomes irrelevant.

I keep forgetting: what was the plan for deprecating the FILE* functions in the parser interface? If we need to continue to support them, we could read the whole contents of the file before parsing, and then use the memory-based parsing algorithm.

If parsing files can be fully based on the IO module, we shouldn't even need to rewind the file. Instead, the io module should support switching the encoding mid-stream (unless, say, we are in the middle of a multibyte character - since the parser always asks for complete lines, this should not happen).
History
Date User Action Args
2010-10-14 07:17:01loewissetrecipients: + loewis, vstinner
2010-10-14 07:17:01loewissetmessageid: <1287040621.55.0.67360038173.issue10095@psf.upfronthosting.co.za>
2010-10-14 07:16:59loewislinkissue10095 messages
2010-10-14 07:16:58loewiscreate