diff options
author | akir <akir> | 2004-08-31 23:07:58 (GMT) |
---|---|---|
committer | akir <akir> | 2004-08-31 23:07:58 (GMT) |
commit | 47160bdb31c8cd8f9a0cc2451349d628588c547e (patch) | |
tree | b0ede24a6dd0504017947e1d323ece3b653b7a65 /src | |
parent | 6a098b07979ce22b3c239f7edb24423110ec7e36 (diff) | |
download | fluxbox_paul-47160bdb31c8cd8f9a0cc2451349d628588c547e.zip fluxbox_paul-47160bdb31c8cd8f9a0cc2451349d628588c547e.tar.bz2 |
fix for the missing CODESET on openbsd
Diffstat (limited to 'src')
-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 |