aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/gtkglobals.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-12-24 01:21:32 +0000
committerGuy Harris <guy@alum.mit.edu>2003-12-24 01:21:32 +0000
commitf941ab7b7dbb3f00543670ace78ce64f3efac551 (patch)
treeb60488d45f21cf3277d071146ff092d07af0309f /gtk/gtkglobals.h
parente6f433d88456da1d31eb192fb18b95c0f0097144 (diff)
Do the "isprint()" hack for GTK+ 2.x or 1.3[.x], whether on UNIX or
Windows - the problem is that GTK+ 1.3[.x] and later assume strings handed to them are UTF-8 strings, not, for example, ISO 8859/x strings. In packet-radius.c, re-define "isprint()" rather than #ifdeffing its use (the old code was also incorrectly treating 0x7f as a printable). svn path=/trunk/; revision=9436
Diffstat (limited to 'gtk/gtkglobals.h')
-rw-r--r--gtk/gtkglobals.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtkglobals.h b/gtk/gtkglobals.h
index 8e083271b2..64d09ab105 100644
--- a/gtk/gtkglobals.h
+++ b/gtk/gtkglobals.h
@@ -1,7 +1,7 @@
/* gtkglobals.h
* GTK-related Global defines, etc.
*
- * $Id: gtkglobals.h,v 1.22 2003/08/01 01:39:01 guy Exp $
+ * $Id: gtkglobals.h,v 1.23 2003/12/24 01:21:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -40,14 +40,14 @@ void set_plist_font(PangoFontDescription *font);
#endif
void set_plist_sel_browse(gboolean);
-#ifdef _WIN32
+#if GTK_MAJOR_VERSION >= 2 || GTK_MINOR_VERSION >= 3
/*
* XXX - "isprint()" can return "true" for non-ASCII characters, but
- * those don't work with GTK+ on Windows, as GTK+ on Windows assumes
- * UTF-8 strings. Until we fix up Ethereal to properly handle
- * non-ASCII characters in all output (both GUI displays and text
- * printouts) on all platforms including Windows, we work around
- * the problem by escaping all characters that aren't printable ASCII.
+ * those don't work with GTK+ 1.3 or later, as they take UTF-8 strings
+ * as input. Until we fix up Ethereal to properly handle non-ASCII
+ * characters in all output (both GUI displays and text printouts)
+ * in those versions of GTK+, we work around the problem by escaping
+ * all characters that aren't printable ASCII.
*/
#undef isprint
#define isprint(c) (c >= 0x20 && c < 0x7f)