From b82999c1ac47b7b559815636f615d0c1ffa5cb56 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Fri, 28 Oct 2011 14:06:45 -0500 Subject: FbTk/FbString.cc,Font.cc: Windows doesn't have nl_langinfo --- src/FbTk/FbString.cc | 4 ++-- src/FbTk/Font.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index d62f5fa..5577f32 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc @@ -169,12 +169,12 @@ void init() { setlocale(LC_CTYPE, ""); #ifdef HAVE_ICONV -#ifdef CODESET +#if defined(CODESET) && !defined(_WIN32) s_locale_codeset = nl_langinfo(CODESET); #else // openbsd doesnt have this (yet?) std::string locale = setlocale(LC_CTYPE, NULL); size_t pos = locale.find('.'); - if (pos != string::npos) + if (pos != std::string::npos) s_locale_codeset = locale.substr(pos+1); #endif // CODESET diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc index ea0fbde..f06e6f6 100644 --- a/src/FbTk/Font.cc +++ b/src/FbTk/Font.cc @@ -136,11 +136,11 @@ Font::Font(const char *name): s_multibyte = true; // check for utf-8 mode -#ifdef CODESET +#if defined(CODESET) && !defined(_WIN32) char *locale_codeset = nl_langinfo(CODESET); #else // openbsd doesnt have this (yet?) char *locale_codeset = 0; -#endif // CODESET +#endif // defined(CODESET) && !defined(_WIN32) if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) { s_utf8mode = true; -- cgit v0.11.2