New submission from STINNER Victor <victor.stin...@haypocalc.com>: Since version 3.2, Python uses the locale encoding in PyUnicode_EncodeFSDefault() using _Py_wchar2char() and _Py_char2wchar() until the codec registry is initialized and the locale codec is loaded (until initfsencoding() is done).
Before Python 3.2, Python used ASCII in PyUnicode_AsEncodedString() at bootstrap (before the codec registry was initialized): we don't need this hack anymore and it is bad to use ASCII instead of the locale encoding (encode/decode can fail). This ticket is just a reminder for me: I am waiting Python 3.3 to remove PyUnicode_AsEncodedString() bootstrap hack ;-) ---------- components: Interpreter Core files: unicode_asencodedstring_bootstrap.patch keywords: patch messages: 128384 nosy: haypo priority: normal severity: normal status: open title: PyUnicode_AsEncodedString: the bootstrap hack is no more needed versions: Python 3.3 Added file: http://bugs.python.org/file20744/unicode_asencodedstring_bootstrap.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11187> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com