summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2017-06-21 21:14:01 +0300
committerAnders Broman <a.broman58@gmail.com>2017-06-22 14:42:50 +0000
commit9a87f80f09b83c559fcd65abf3d7b0e5428fb928 (patch)
tree6af1809ef75e5067069ea99fe2b62b82ea526e77
parent123d170767f6e51ce6b216d633fb03a3cf311109 (diff)
downloadwireshark-9a87f80f09b83c559fcd65abf3d7b0e5428fb928.tar.gz
gsm_cbs: sabp: Display Unicode messages
The broadcast message page content is always converted to UTF-8 in the dissect_cbs_data function using tvb_get_string_enc(...) Change-Id: I5fe3d421917b38ccb07438f01f3c4d4ea8cbd787 Reviewed-on: https://code.wireshark.org/review/22315 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/asn1/sabp/packet-sabp-template.c2
-rw-r--r--epan/dissectors/packet-cell_broadcast.c14
-rw-r--r--epan/dissectors/packet-sabp.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/asn1/sabp/packet-sabp-template.c b/epan/dissectors/asn1/sabp/packet-sabp-template.c
index 709afa6b4b..b3d2d6150f 100644
--- a/epan/dissectors/asn1/sabp/packet-sabp-template.c
+++ b/epan/dissectors/asn1/sabp/packet-sabp-template.c
@@ -240,7 +240,7 @@ void proto_register_sabp(void) {
NULL, HFILL }},
{ &hf_sabp_cbs_page_content,
{ "CBS Page Content", "sabp.cb_page_content",
- FT_STRING, BASE_NONE, NULL, 0,
+ FT_STRING, STR_UNICODE, NULL, 0,
NULL, HFILL }},
{ &hf_sabp_cb_inf_len,
{ "CBS-Message-Information-Length", "sabp.cb_inf_len",
diff --git a/epan/dissectors/packet-cell_broadcast.c b/epan/dissectors/packet-cell_broadcast.c
index 23162d7832..5151c56cc5 100644
--- a/epan/dissectors/packet-cell_broadcast.c
+++ b/epan/dissectors/packet-cell_broadcast.c
@@ -326,11 +326,11 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *cbs_page_subtree = proto_tree_add_subtree(cbs_page_tree, tvb, offset, -1,
ett_gsm_cbs_page_content, NULL, "Cell Broadcast Page Contents");
len = tvb_reported_length(cbs_page_tvb);
- proto_tree_add_item(cbs_page_subtree, hf_gsm_cbs_page_content, cbs_page_tvb, 0, text_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cbs_page_subtree, hf_gsm_cbs_page_content, cbs_page_tvb, 0, text_len, ENC_UTF_8|ENC_NA);
len -= text_len;
if (len)
{
- proto_tree_add_item(cbs_page_subtree, hf_gsm_cbs_page_content_padding, cbs_page_tvb, text_len, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cbs_page_subtree, hf_gsm_cbs_page_content_padding, cbs_page_tvb, text_len, len, ENC_UTF_8|ENC_NA);
}
}
if (text_len)
@@ -366,7 +366,7 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
cbs_msg_item = proto_tree_add_protocol_format(proto_tree_get_root(tree), proto_cell_broadcast, cbs_msg_tvb, 0, len, "GSM Cell Broadcast Message");
cbs_msg_tree = proto_item_add_subtree(cbs_msg_item, ett_cbs_msg);
- proto_tree_add_item(cbs_msg_tree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cbs_msg_tree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, len, ENC_UTF_8|ENC_NA);
}
return tvb_captured_length(tvb);
@@ -398,7 +398,7 @@ int dissect_umts_cell_broadcast_message(tvbuff_t *tvb, packet_info *pinfo, proto
msg_len = tvb_reported_length(cbs_msg_tvb);
cbs_subtree = proto_tree_add_subtree_format(cbs_tree, tvb, offset, -1,
ett_cbs_msg, NULL, "Cell Broadcast Message Contents (length: %d)", msg_len);
- msg = tvb_get_string_enc(wmem_packet_scope(), cbs_msg_tvb, 0, msg_len, ENC_ASCII);
+ msg = tvb_get_string_enc(wmem_packet_scope(), cbs_msg_tvb, 0, msg_len, ENC_UTF_8|ENC_NA);
proto_tree_add_string_format(cbs_subtree, hf_gsm_cbs_message_content, cbs_msg_tvb, 0, -1, msg, "%s", msg);
return tvb_captured_length(tvb);
}
@@ -520,21 +520,21 @@ proto_register_cbs(void)
{ &hf_gsm_cbs_page_content,
{ "CBS Page Content",
"gsm_cbs.page_content",
- FT_STRING, BASE_NONE, NULL, 0x0,
+ FT_STRING, STR_UNICODE, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_gsm_cbs_page_content_padding,
{ "CBS Page Content Padding",
"gsm_cbs.page_content_padding",
- FT_STRING, BASE_NONE, NULL, 0x0,
+ FT_STRING, STR_UNICODE, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_gsm_cbs_message_content,
{ "CBS Message Content",
"gsm_cbs.message_content",
- FT_STRING, BASE_NONE, NULL, 0x0,
+ FT_STRING, STR_UNICODE, NULL, 0x0,
NULL, HFILL
}
}
diff --git a/epan/dissectors/packet-sabp.c b/epan/dissectors/packet-sabp.c
index 79d60f4057..86eaaeabe2 100644
--- a/epan/dissectors/packet-sabp.c
+++ b/epan/dissectors/packet-sabp.c
@@ -1877,7 +1877,7 @@ void proto_register_sabp(void) {
NULL, HFILL }},
{ &hf_sabp_cbs_page_content,
{ "CBS Page Content", "sabp.cb_page_content",
- FT_STRING, BASE_NONE, NULL, 0,
+ FT_STRING, STR_UNICODE, NULL, 0,
NULL, HFILL }},
{ &hf_sabp_cb_inf_len,
{ "CBS-Message-Information-Length", "sabp.cb_inf_len",