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:
Jakub Zawadzki 2012-05-20 18:32:44 +00:00
parent feeed92f95
commit 42ec0ca701
1 changed files with 2 additions and 2 deletions

View File

@ -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)) {