dynamic rendering of utf8 characters such as umlauts by using ttf (wip)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4769 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2010-01-14 22:19:27 +00:00
parent 2a27edf8a3
commit e232a3f3ac
9 changed files with 556 additions and 39 deletions
+7
View File
@@ -8,8 +8,15 @@ i18nmanager::i18nmanager(const char *domain, const char *basepath) : domain(doma
locale = setlocale(LC_ALL, ""); // use current default locale
bindtextdomain(domain, basepath); // set base path
textdomain(domain);
bind_textdomain_codeset(domain, "UTF-8"); // we use the utf-8 charset only
printf("current locale: %s\n", locale);
const char *test = _("About");
std::string test2(test);
bool valid = utf8::is_valid(test2.begin(), test2.end());
printf("is valid: %s", valid ? "true" : "false");
}
// export gettext to cubescript