Nick Coghlan added the comment: The gory details of the current startup situation are in PEP 432. However, the comprehensive solution described in that PEP isn't going to make it into Python 3.4, so a simpler interim fix would be worthwhile.
Since Blender is designed to support building against the system Python, the trick of forcing Python to link to an alternate implementation of a function won't work. Inspired by http://docs.python.org/3/c-api/init.html#Py_SetPath, I suggest offering an API like: int Py_SetStandardStreamEncoding(char *encoding, char *errors) { if (Py_IsInitialized()) { return -1; } Py_StandardStreamEncoding = _PyMem_Strdup(encoding); Py_StandardStreamErrors = _PyMem_Strdup(errors); } The initstdio function in pythonrun.c would then be updated to use the specified Py_StandardStreamEncoding and Py_StandardStreamErrors if they weren't NULL (since that would indicate an embedding application had called SetStandardStreamEncoding). ---------- assignee: ncoghlan -> _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16129> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com