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-ptpip.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-ptpip.c')
-rw-r--r-- | epan/dissectors/packet-ptpip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ptpip.c b/epan/dissectors/packet-ptpip.c index ce654bc8aa..9548d62b30 100644 --- a/epan/dissectors/packet-ptpip.c +++ b/epan/dissectors/packet-ptpip.c @@ -865,7 +865,7 @@ void dissect_ptpIP_unicode_name(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t gint nameLen; nameLen = tvb_unicode_strsize(tvb, *offset); - name = tvb_get_unicode_string(wmem_packet_scope(), tvb, *offset, nameLen, ENC_LITTLE_ENDIAN); + name = tvb_get_string_enc(wmem_packet_scope(), tvb, *offset, nameLen, ENC_UTF_16|ENC_LITTLE_ENDIAN); proto_tree_add_string(tree, hf_ptpIP_name, tvb, *offset, nameLen, name); *offset += nameLen; col_append_fstr( |