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:
authorJiri Hnidek <jiri.hnidek@tul.cz>2006-05-25 19:36:38 +0400
committerJiri Hnidek <jiri.hnidek@tul.cz>2006-05-25 19:36:38 +0400
commit1b2d9b5ade184d26679b3b4f2e09f27d84b9fd39 (patch)
treec5618cb7ce8f9d7744bc6288c466298d39bfca74 /source/blender/ftfont
parent9659cdda8048de0243b809abf83be2ae5be144e9 (diff)
Bugfix:
Ubuntu users can set up locales again (propably some other linux distros had same problem)
Diffstat (limited to 'source/blender/ftfont')
-rw-r--r--source/blender/ftfont/intern/FTF_TTFont.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp
index 4b6843cfcd4..78245709e2d 100644
--- a/source/blender/ftfont/intern/FTF_TTFont.cpp
+++ b/source/blender/ftfont/intern/FTF_TTFont.cpp
@@ -259,7 +259,20 @@ void FTF_TTFont::SetLanguage(char* str)
#else
char *locreturn = setlocale(LC_ALL, str);
if (locreturn == NULL) {
- printf("could not change language to %s\n", str);
+ char *lang;
+
+ lang = (char*)malloc(sizeof(char)*(strlen(str)+7));
+
+ lang[0] = '\0';
+ strcat(lang, str);
+ strcat(lang, ".UTF-8");
+
+ locreturn = setlocale(LC_ALL, lang);
+ if (locreturn == NULL) {
+ printf("could not change language to %s nor %s\n", str, lang);
+ }
+
+ free(lang);
}
setlocale(LC_NUMERIC, "C");