Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-28 16:34:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-28 16:34:22 +0400
commitf28b5e672ed05bb08b317c78a36b31e7c49d4f4e (patch)
treee326ad5f429f01c63878989d4ca393aa9bc65051 /source/blender/editors/space_file
parent7a7076c878f7f5f5a28653a9a0df76065948ea7a (diff)
python/utf8 compatibility fixes. (as discussed on the mailing list)
- user input gets non utf8 chars stripped all text input other then file paths. - python has the same limitations, it will raise an error on non utf8 strings except for paths use unicode escape literals so its possible to deal with saving to these file paths from python. - new string functions BLI_utf8_invalid_byte(str, len) returns the first invalid utf8 byte or -1 on on success. BLI_utf8_invalid_strip(str, len) strips non utf-8 chars.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 3368ce636e1..0867acbfb60 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -177,11 +177,14 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
params->dir, 0.0, (float)FILE_MAX-1, 0, 0,
"File path.");
uiButSetCompleteFunc(but, autocomplete_directory, NULL);
+ uiButSetFlag(but, UI_BUT_NO_UTF8);
+
but = uiDefBut(block, TEX, B_FS_FILENAME, "",
min_x, line2_y, line2_w-chan_offs, btn_h,
params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0,
"File name.");
uiButSetCompleteFunc(but, autocomplete_file, NULL);
+ uiButSetFlag(but, UI_BUT_NO_UTF8);
}
/* Filename number increment / decrement buttons. */