From 12a432eefc8f1b5a0166e39b72d638358036e204 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sat, 24 Aug 2002 21:13:30 +0000 Subject: [PATCH] Replaced gdk_mbstowcs with mbstowcs from stdlib.h. Gdk_mbstowcs is broken in locales that do not use multi-byte characters and any LC_* environmental variables are set. This caused problems for Mandrake 8.x users (and probably others too). git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@53 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels1/src/hack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glabels1/src/hack.c b/glabels1/src/hack.c index 47db1c8c..07ecf0a9 100644 --- a/glabels1/src/hack.c +++ b/glabels1/src/hack.c @@ -29,6 +29,7 @@ #include #include +#include #include "hack.h" @@ -48,7 +49,7 @@ gl_hack_text_to_utf8 (gchar * text) len = strlen (text); wide_text = g_new (GdkWChar, len + 1); - enc_status = gdk_mbstowcs (wide_text, text, len); + enc_status = mbstowcs ((wchar_t *)wide_text, (char *)text, len); if (enc_status < 0) { g_free (wide_text); return NULL; @@ -80,7 +81,7 @@ gl_hack_get_width_string (GnomeFont * font, len = strlen (text); wide_text = g_new (GdkWChar, len + 1); - enc_status = gdk_mbstowcs (wide_text, text, len); + enc_status = mbstowcs ((wchar_t *)wide_text, (char *)text, len); if (enc_status < 0) { g_free (wide_text); return 0.0; -- 2.39.5