Anders Munch <and...@jmunch.dk> added the comment:
getlocale is documented to return None for the encoding if no encoding can be determined. There's no need to guess. I can't change the locale.setlocale call, because where I'm actually having the problem, I'm not even calling locale.setlocale: wxWidgets is calling C setlocale, that's where it comes from. wxWidgets aside, it doesn't seem right that getlocale fails when setlocale succeeded. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43115> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com