aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-07-25 05:23:36 -0700
committerGuy Harris <guy@alum.mit.edu>2019-07-25 14:50:40 +0000
commitedd5eaa57e4eb9157d7593dff6a58e030bf8987e (patch)
treed557457893f9ee30c9fe3583c85bd87e1094536e /epan/proto.c
parentdd5f2bd054710910788656e068ad8853089c84c5 (diff)
Don't format printable non-ASCII Unicode characters as escape sequences.
Note that even strings fetched with ENC_ASCII may contain them - bytes with the 8th bit set get mapped to REPLACEMENT CHARACTER. This means we can format STR_UNICODE fields with format_text(); do so. Bug: 1372 Change-Id: Ia32c3a92d220ac5174ecd25f33e2d1f85cfb8cb8 Reviewed-on: https://code.wireshark.org/review/34080 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 9d8a0a1a39..95259e2bd2 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1016,8 +1016,7 @@ hfinfo_format_text(wmem_allocator_t *scope, const header_field_info *hfinfo,
return format_text_wsp(string, strlen(string));
*/
case STR_UNICODE:
- /* XXX, format_unicode_text() */
- return wmem_strdup(scope, string);
+ return format_text(scope, string, strlen(string));
}
return format_text(scope, string, strlen(string));