Message104986
| 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: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 |
|