forked from bartvdbraak/blender
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.
This commit is contained in:
parent
f8c2ce93b9
commit
d6a36633c5
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user