Fix T31555: Username with special chars in Windows 7
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 1 May 2014 14:22:30 +0000 (16:22 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 1 May 2014 14:25:39 +0000 (16:25 +0200)
At last! Could not check seriously on windows (though it was done during py patch
process).

source/blender/python/intern/bpy_interface.c

index 43ca6957f833207d560950c2eaf2f1bcbb059f6a..6dab586e79661d7b6d33a447f209a0283f04a91e 100644 (file)
@@ -257,11 +257,7 @@ void BPY_python_start(int argc, const char **argv)
         * an error, this is highly annoying, another stumbling block for devs,
         * so use a more relaxed error handler and enforce utf-8 since the rest of
         * blender is utf-8 too - campbell */
-
-       /* XXX, update: this is unreliable! 'PYTHONIOENCODING' is ignored in MS-Windows
-        * when dynamically linked, see: [#31555] for details.
-        * Python doesn't expose a good way to set this. */
-       BLI_setenv("PYTHONIOENCODING", "utf-8:surrogateescape");
+       Py_SetStandardStreamEncoding("utf-8", "surrogateescape");
 
        /* Update, Py3.3 resolves attempting to parse non-existing header */
 #if 0