[issue19846] Python 3 raises Unicode errors with the C locale

Sworddragon report at bugs.python.org
Fri Dec 13 12:01:31 CET 2013


Sworddragon added the comment:

>> The fact that write() uses sys.getfilesystemencoding() is either
>> a defect or a bad design (I leave the decision to you).

> I have good news for you.  write() does not cal sys.getfilesystemencoding(), because the encoding is set at the time the > file is opened.

Now after some researching I see I wasn't wrong at all. I should've been sayed:

"The fact that write() -> open() relies on sys.getfilesystemencoding() (respectively locale.getpreferredencoding()) at default as encoding is either a defect or a bad design (I leave the decision to you)."

Or am I overlooking something?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19846>
_______________________________________


More information about the Python-bugs-list mailing list