diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2012-05-20 18:32:44 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2012-05-20 18:32:44 +0000 |
commit | 42ec0ca701ac3b9c62dd90575a388b82da8e6224 (patch) | |
tree | 7019e56b9782163ebcab710aa237ebdac915dac8 /epan/strutil.c | |
parent | feeed92f95559dfeae6aadc9620ab58bdbc05ade (diff) | |
download | wireshark-42ec0ca701ac3b9c62dd90575a388b82da8e6224.tar.gz wireshark-42ec0ca701ac3b9c62dd90575a388b82da8e6224.tar.bz2 wireshark-42ec0ca701ac3b9c62dd90575a388b82da8e6224.zip |
Revert r35131 fix bug #5738
g_unichar_isprint() is for *wide characters*.
For UTF-8 multibyte characters we could
use g_utf8_validate() and g_utf8_next_char(),
but IMHO format_text_* should be ASCII-only.
We rather need to store encoding of FT_STRING[Z]
and in proto_item_fill_label() call appropiate
function.
For ENC_ASCII use format_text(),
for unicode (ENC_UTF*, ENC_UCS*) use format_text_utf(),
etc..
svn path=/trunk/; revision=42727
Diffstat (limited to 'epan/strutil.c')
-rw-r--r-- | epan/strutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/strutil.c b/epan/strutil.c index ebd4c49040..0ae68824aa 100644 --- a/epan/strutil.c +++ b/epan/strutil.c @@ -187,7 +187,7 @@ format_text(const guchar *string, size_t len) } c = *string++; - if (g_unichar_isprint(c)) { + if (isprint(c)) { fmtbuf[idx][column] = c; column++; } else { @@ -293,7 +293,7 @@ format_text_wsp(const guchar *string, size_t len) } c = *string++; - if (g_unichar_isprint(c)) { + if (isprint(c)) { fmtbuf[idx][column] = c; column++; } else if (isspace(c)) { |