diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-12-19 09:19:33 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-12-19 09:19:33 +0000 |
commit | 317b82898664af0f0fe71c513995bb137d0a3c57 (patch) | |
tree | 37b1f0304675d62189eebd6faaa8d8383eba893e /epan/dissectors/packet-ndps.c | |
parent | 4a346b71882c782cf070e382a4bf718150b192d8 (diff) |
Use proto_tree_add_item() or tvb_get_string_enc() instead of
tvb_get_unicode_string(). If there's an indication that the encoding is
UCS-2, use that, otherwise use UTF-16. (For example, "BMP" stands for
"Basic Multilingual Plane", which is the part of Unicode that can be
encoded in 16 bits, hence UCS-2.)
In the description of the "Use Heuristics for UDP" preference for the
XML dissector, note that it's not just trying to recognize XML in UCS-2,
it's trying to recognize XML in *big-endian* UCS-2.
svn path=/trunk/; revision=54245
Diffstat (limited to 'epan/dissectors/packet-ndps.c')
-rw-r--r-- | epan/dissectors/packet-ndps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index a7e80f1b87..bfb20afde0 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -2068,12 +2068,12 @@ ndps_string(tvbuff_t* tvb, int hfinfo, proto_tree *ndps_tree, int offset, char * /* * ASCII. */ - string = tvb_get_string(wmem_packet_scope(), tvb, foffset, str_length); + string = tvb_get_string_enc(wmem_packet_scope(), tvb, foffset, str_length, ENC_ASCII|ENC_NA); /* XXX - extended ASCII? */; } else { /* * Unicode. */ - string = tvb_get_unicode_string(wmem_packet_scope(), tvb, foffset, str_length, ENC_LITTLE_ENDIAN); + string = tvb_get_string_enc(wmem_packet_scope(), tvb, foffset, str_length, ENC_UTF_16|ENC_LITTLE_ENDIAN); } foffset += str_length; proto_tree_add_string(ndps_tree, hfinfo, tvb, offset, str_length + 4, string); |