New submission from STINNER Victor <victor.stin...@haypocalc.com>:

I introduced initfsencoding() in #8610 to ensure that Py_FileSystemEncoding is 
not more NULL. In the discussion, Marc Lemburg noticed that falling back the 
UTF-8 on nl_langinfo(CODESET) error is a bad idea: ASCII is better (I agree).

We cannot fall back to ASCII yet because there are two other problems that have 
to be fixed before that:

 - Python3 doesn't support surrogates in module filenames: see #8611
 - If Py_FileSystemEncoding is NULL, encoding functions fallback to utf-8 
(PyUnicode_GetDefaultEncoding()). #8715 proposes a new 
PyUnicode_EncodeFSDefault() function to fix this problem

Attached patch is a partial fix for this issue.

----------
components: Interpreter Core, Unicode
files: fsencoding_ascii.patch
keywords: patch
messages: 105804
nosy: haypo
priority: normal
severity: normal
status: open
title: Python3: use ASCII for the file system encoding on initfsencoding() 
failure
versions: Python 3.2
Added file: http://bugs.python.org/file17353/fsencoding_ascii.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8725>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to