summaryrefslogtreecommitdiff
path: root/epan/strutil.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-12-24 01:12:17 +0000
committerGuy Harris <guy@alum.mit.edu>2003-12-24 01:12:17 +0000
commite6f433d88456da1d31eb192fb18b95c0f0097144 (patch)
tree18e9f381b6b3405b6684f3601c208ac8859abcc8 /epan/strutil.c
parent839ce07c9ac30db8a0bd3ac2850a6f4a545fc10b (diff)
downloadwireshark-e6f433d88456da1d31eb192fb18b95c0f0097144.tar.gz
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=9435
Diffstat (limited to 'epan/strutil.c')
-rw-r--r--epan/strutil.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/strutil.c b/epan/strutil.c
index 93b5b1ef5f..96eefb0926 100644
--- a/epan/strutil.c
+++ b/epan/strutil.c
@@ -1,7 +1,7 @@
/* strutil.c
* String utility routines
*
- * $Id: strutil.c,v 1.12 2003/08/27 15:23:02 gram Exp $
+ * $Id: strutil.c,v 1.13 2003/12/24 01:12:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -133,14 +133,14 @@ get_token_len(const guchar *linep, const guchar *lineend,
#define INITIAL_FMTBUF_SIZE 128
-#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)