diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Font.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc index 85b79d6..3d4608d 100644 --- a/src/FbTk/Font.cc +++ b/src/FbTk/Font.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: Font.cc,v 1.17 2004/08/31 21:47:56 akir Exp $ | 22 | //$Id: Font.cc,v 1.18 2004/08/31 23:07:58 akir Exp $ |
23 | 23 | ||
24 | 24 | ||
25 | #include "StringUtil.hh" | 25 | #include "StringUtil.hh" |
@@ -252,11 +252,15 @@ Font::Font(const char *name, bool antialias): | |||
252 | m_multibyte = true; | 252 | m_multibyte = true; |
253 | 253 | ||
254 | // check for utf-8 mode | 254 | // check for utf-8 mode |
255 | #ifdef CODESET | ||
255 | char *locale_codeset = nl_langinfo(CODESET); | 256 | char *locale_codeset = nl_langinfo(CODESET); |
257 | #else // openbsd doesnt have this (yet?) | ||
258 | char *locale_codeset = 0; | ||
259 | #endif // CODESET | ||
256 | 260 | ||
257 | if (strcmp("UTF-8", locale_codeset) == 0) { | 261 | if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) { |
258 | m_utf8mode = true; | 262 | m_utf8mode = true; |
259 | } else { | 263 | } else if (locale_codeset != 0) { |
260 | // if locale isn't UTF-8 we try to | 264 | // if locale isn't UTF-8 we try to |
261 | // create a iconv pointer so we can | 265 | // create a iconv pointer so we can |
262 | // convert non utf-8 strings to utf-8 | 266 | // convert non utf-8 strings to utf-8 |