Page MenuHome

Additional fix for T35176: Python failure with .blend files loaded from paths including non-ASCII characters
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Jun 13 2014, 4:28 AM.

Details

Summary

Additional fix for T35176: Python failure with .blend files loaded from paths including non-ASCII characters.

The problem is that the "Run Script" operation in the Text Editor fails if the path name to
a .blend file or the script file name contains non-ASCII characters.

The cause is a UnicodeDecodeError in PyC_DefaultNameSpace(). This function expects
a file name in the file sytem default encoding (e.g., the "mbcs" encoding under Windows
in Asian locales), but file names in Blender are mostly encoded in UTF-8.

The present solution is simple: let PyC_DefaultNameSpace() accept both UTF-8 (preferred)
and the file system default encoding.

Diff Detail