diff options
author | Ton Roosendaal <ton@blender.org> | 2004-11-23 15:19:18 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-11-23 15:19:18 +0300 |
commit | d6a36633c5e9a7ff80ce01bfccecbfbab23063d8 (patch) | |
tree | 576d957925f02dd9b1eb96304b0b0429fb83c87f /source/blender/ftfont | |
parent | f8c2ce93b978dbcb1e197fa30a0557c405856fcc (diff) |
Patch provided by Yann Vernier
This patch should make gettext return unicode, which is what freetype
expects (also explicitly set in the same file). It makes translations
that support non-ascii *and* non-unicode encodings, such as latin 1 for
western european languages, draw correctly. The problem only occurs for
platforms where those encodings are default, i.e. in Linux if
/etc/locale.gen looks like this:
sv_SE ISO-8859-15
If it were to read UTF-8 this patch doesn't change the behaviour at all.
This is probably the case for Mac OS X and perhaps Windows.
Diffstat (limited to 'source/blender/ftfont')
-rw-r--r-- | source/blender/ftfont/intern/FTF_TTFont.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp index d089abe5c49..5be311a4f10 100644 --- a/source/blender/ftfont/intern/FTF_TTFont.cpp +++ b/source/blender/ftfont/intern/FTF_TTFont.cpp @@ -226,6 +226,7 @@ void FTF_TTFont::SetLanguage(char* str) bindtextdomain(DOMAIN_NAME, messagepath); + bind_textdomain_codeset(DOMAIN_NAME, encoding_name); textdomain(DOMAIN_NAME); strcpy(language, str); @@ -235,6 +236,7 @@ void FTF_TTFont::SetLanguage(char* str) void FTF_TTFont::SetEncoding(char* str) { strcpy(encoding_name, str); + bind_textdomain_codeset(DOMAIN_NAME, encoding_name); } |