diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-05-26 13:58:22 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-05-26 13:58:22 +0400 |
commit | 042a3ff3822254e33371e1dd782dd721ce3d0ec9 (patch) | |
tree | 7228056b9d14520964a5eb88edeafbd80acaf53b /source/blender/blenlib/intern/string.c | |
parent | 686859afadb71c19381774b6eac28f2454a0ab49 (diff) |
Fix #27445: various operators missing with some non-english system languages.
In the case of this bug e.g. material.new became MATERiAL_OT_new, due to
different capitalization of "i" in Turkish. Fixed by not using the locale
dependent toupper/tolower functions.
Diffstat (limited to 'source/blender/blenlib/intern/string.c')
-rw-r--r-- | source/blender/blenlib/intern/string.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index ee5bd17c901..11de8a3d45c 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -469,3 +469,21 @@ int BLI_utf8_invalid_strip(char *str, int length) return tot; } +void BLI_ascii_strtolower(char *str, int len) +{ + int i; + + for(i=0; i<len; i++) + if(str[i] >= 'A' && str[i] <= 'Z') + str[i] += 'a' - 'A'; +} + +void BLI_ascii_strtoupper(char *str, int len) +{ + int i; + + for(i=0; i<len; i++) + if(str[i] >= 'a' && str[i] <= 'z') + str[i] -= 'a' - 'A'; +} + |