all repos — fluxbox @ 47160bdb31c8cd8f9a0cc2451349d628588c547e

custom fork of the fluxbox windowmanager

fix for the missing CODESET on openbsd
akir akir
commit

47160bdb31c8cd8f9a0cc2451349d628588c547e

parent

6a098b07979ce22b3c239f7edb24423110ec7e36

1 files changed, 7 insertions(+), 3 deletions(-)

jump to
M src/FbTk/Font.ccsrc/FbTk/Font.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Font.cc,v 1.17 2004/08/31 21:47:56 akir Exp $ +//$Id: Font.cc,v 1.18 2004/08/31 23:07:58 akir Exp $ #include "StringUtil.hh"

@@ -252,11 +252,15 @@ if (MB_CUR_MAX > 1) // more than one byte, then we're multibyte

m_multibyte = true; // check for utf-8 mode +#ifdef CODESET char *locale_codeset = nl_langinfo(CODESET); +#else // openbsd doesnt have this (yet?) + char *locale_codeset = 0; +#endif // CODESET - if (strcmp("UTF-8", locale_codeset) == 0) { + if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) { m_utf8mode = true; - } else { + } else if (locale_codeset != 0) { // if locale isn't UTF-8 we try to // create a iconv pointer so we can // convert non utf-8 strings to utf-8