FbTk/FbString.cc,Font.cc: Windows doesn't have nl_langinfo
This commit is contained in:
parent
d4f682c7bd
commit
b82999c1ac
2 changed files with 4 additions and 4 deletions
|
@ -169,12 +169,12 @@ void init() {
|
||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
|
|
||||||
#ifdef HAVE_ICONV
|
#ifdef HAVE_ICONV
|
||||||
#ifdef CODESET
|
#if defined(CODESET) && !defined(_WIN32)
|
||||||
s_locale_codeset = nl_langinfo(CODESET);
|
s_locale_codeset = nl_langinfo(CODESET);
|
||||||
#else // openbsd doesnt have this (yet?)
|
#else // openbsd doesnt have this (yet?)
|
||||||
std::string locale = setlocale(LC_CTYPE, NULL);
|
std::string locale = setlocale(LC_CTYPE, NULL);
|
||||||
size_t pos = locale.find('.');
|
size_t pos = locale.find('.');
|
||||||
if (pos != string::npos)
|
if (pos != std::string::npos)
|
||||||
s_locale_codeset = locale.substr(pos+1);
|
s_locale_codeset = locale.substr(pos+1);
|
||||||
#endif // CODESET
|
#endif // CODESET
|
||||||
|
|
||||||
|
|
|
@ -136,11 +136,11 @@ Font::Font(const char *name):
|
||||||
s_multibyte = true;
|
s_multibyte = true;
|
||||||
|
|
||||||
// check for utf-8 mode
|
// check for utf-8 mode
|
||||||
#ifdef CODESET
|
#if defined(CODESET) && !defined(_WIN32)
|
||||||
char *locale_codeset = nl_langinfo(CODESET);
|
char *locale_codeset = nl_langinfo(CODESET);
|
||||||
#else // openbsd doesnt have this (yet?)
|
#else // openbsd doesnt have this (yet?)
|
||||||
char *locale_codeset = 0;
|
char *locale_codeset = 0;
|
||||||
#endif // CODESET
|
#endif // defined(CODESET) && !defined(_WIN32)
|
||||||
|
|
||||||
if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) {
|
if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) {
|
||||||
s_utf8mode = true;
|
s_utf8mode = true;
|
||||||
|
|
Loading…
Reference in a new issue