Message104986
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. |
|
Date |
User |
Action |
Args |
2010-05-05 00:15:53 | vstinner | set | recipients:
+ vstinner |
2010-05-05 00:15:52 | vstinner | set | messageid: <1273018552.76.0.742694587977.issue8610@psf.upfronthosting.co.za> |
2010-05-05 00:15:51 | vstinner | link | issue8610 messages |
2010-05-05 00:15:49 | vstinner | create | |
|