forked from osmocom/wireshark
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
This commit is contained in:
parent
feeed92f95
commit
42ec0ca701
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue