Adds support for utf paths on Windows.
Not all file formats/calls are supported yet. It will be expended. Please from now on use BLI_fopen, BLI_* for file manipulations. For non-windows systems BLI_fopen just calls fopen. For Windows, the utf-8 string is translated to utf-16 string in order to call UTF version of the function.
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
#include "DNA_text_types.h"
|
||||
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_fileops.h"
|
||||
#include "BLI_math_base.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utf8.h"
|
||||
@@ -388,7 +389,7 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text,
|
||||
|
||||
}
|
||||
else {
|
||||
FILE *fp = fopen(fn, "r");
|
||||
FILE *fp = BLI_fopen(fn, "r");
|
||||
|
||||
if (fp) {
|
||||
py_dict = PyC_DefaultNameSpace(fn);
|
||||
|
Reference in New Issue
Block a user