From d6a36633c5e9a7ff80ce01bfccecbfbab23063d8 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 23 Nov 2004 12:19:18 +0000 Subject: [PATCH] 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. --- source/blender/ftfont/intern/FTF_TTFont.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); }