This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sworddragon
Recipients Sworddragon, a.badger, bkabrda, larry, lemburg, loewis, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, terry.reedy, vstinner
Date 2013-12-13.12:19:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386937189.81.0.736900543235.issue19846@psf.upfronthosting.co.za>
In-reply-to
Content
> Instead, open() determines the default encoding by calling the same function that's used to initialize Py_FileSystemDefaultEncoding: get_locale_encoding() in Python/pythonrun.c.  Which on POSIX systems calls the POSIX function nl_langinfo().

open() will use at default the encoding of nl_langinfo() as sys.getfilesystemencoding() does on *nix. This is the part that looks dirty to me. As soon as LANG is set to C open() will rely on 'ascii' due to nl_langinfo() like sys.getfilesystemencoding() does too.
History
Date User Action Args
2013-12-13 12:19:49Sworddragonsetrecipients: + Sworddragon, lemburg, loewis, terry.reedy, ncoghlan, pitrou, vstinner, larry, a.badger, r.david.murray, serhiy.storchaka, bkabrda
2013-12-13 12:19:49Sworddragonsetmessageid: <1386937189.81.0.736900543235.issue19846@psf.upfronthosting.co.za>
2013-12-13 12:19:49Sworddragonlinkissue19846 messages
2013-12-13 12:19:49Sworddragoncreate