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 vstinner
Recipients vstinner
Date 2010-05-05.00:15:47
SpamBayes Score 0.0033694978
Marked as misclassified No
Message-id <1273018552.76.0.742694587977.issue8610@psf.upfronthosting.co.za>
In-reply-to
Content
Patch for the second solution (fallback to utf-8 on get_codeset() failure):

 - create a subfunction initfsencoding() (Py_InitializeEx is already very long)
 - hardcode the encoding to utf-8 if nl_langinfo(CODESET) is missing
 - don't call get_codeset() on Windows or Mac OS X
 - call _PyCodec_Lookup(Py_FileSystemDefaultEncoding) if get_codeset() was not called (eg. on Windows) or if get_codeset() failed to ensure that the codec can be (and is) loaded: display a fatal error on failure

Since I wrote patches for both solution, I can now compare correctly advantages and disavantages. I prefer initfsencoding() because it works on all cases and is simpler than no_fsencoding_error.patch.
History
Date User Action Args
2010-05-05 00:15:53vstinnersetrecipients: + vstinner
2010-05-05 00:15:52vstinnersetmessageid: <1273018552.76.0.742694587977.issue8610@psf.upfronthosting.co.za>
2010-05-05 00:15:51vstinnerlinkissue8610 messages
2010-05-05 00:15:49vstinnercreate