aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2016-05-29 11:10:24 +0200
committerJaap Keuter <jaap.keuter@xs4all.nl>2016-06-09 08:46:37 +0000
commit2a0d61e1a4f74e138352a7d9178c7ec3c20b434c (patch)
tree6c5c3f5ce85347a3984b09d5e6d4576604ab85a1 /epan
parentd907fc2800f7ae4bf7472ffdd20d5d85931f5907 (diff)
Logcat: Unicodize texts
Text over Logcat is in real in Unicode. ASCII does not display it correctly. Change-Id: I998dad1ee50c4b00b874a1f197f6e465fadd3e38 Reviewed-on: https://code.wireshark.org/review/15791 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-logcat-text.c6
-rw-r--r--epan/dissectors/packet-logcat.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-logcat-text.c b/epan/dissectors/packet-logcat-text.c
index 1f161ecdd2..73d09a8d75 100644
--- a/epan/dissectors/packet-logcat-text.c
+++ b/epan/dissectors/packet-logcat-text.c
@@ -191,7 +191,7 @@ static int dissect_logcat_text(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
gchar **tokens;
guint i;
gchar *frame = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, tvb_captured_length(tvb),
- ENC_ASCII);
+ ENC_UTF_8);
proto_item *mainitem = proto_tree_add_item(tree, proto_logcat_text, tvb, 0, -1, ENC_NA);
proto_tree *maintree = proto_item_add_subtree(mainitem, ett_logcat);
gint offset = 0;
@@ -311,12 +311,12 @@ void proto_register_logcat_text(void) {
},
{ &hf_logcat_text_tag,
{ "Tag", "logcat_text.tag",
- FT_STRING, STR_ASCII, NULL, 0x00, NULL, HFILL
+ FT_STRING, STR_UNICODE, NULL, 0x00, NULL, HFILL
}
},
{ &hf_logcat_text_log,
{ "Log", "logcat_text.log",
- FT_STRING, STR_ASCII, NULL, 0x00, NULL, HFILL
+ FT_STRING, STR_UNICODE, NULL, 0x00, NULL, HFILL
}
},
{ &hf_logcat_text_priority,
diff --git a/epan/dissectors/packet-logcat.c b/epan/dissectors/packet-logcat.c
index 92279ccb58..0619299dde 100644
--- a/epan/dissectors/packet-logcat.c
+++ b/epan/dissectors/packet-logcat.c
@@ -156,7 +156,7 @@ dissect_logcat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
check_length = 1;
string_length = tvb_strsize(tvb, offset);
- proto_tree_add_item(maintree, hf_logcat_tag, tvb, offset, string_length, ENC_ASCII | ENC_NA);
+ proto_tree_add_item(maintree, hf_logcat_tag, tvb, offset, string_length, ENC_UTF_8 | ENC_NA);
set_address_tvb(&pinfo->src, AT_STRINGZ, string_length + 1, tvb, offset);
set_address(&pinfo->dst, AT_STRINGZ, 7, "Logcat");
@@ -165,7 +165,7 @@ dissect_logcat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
check_length += string_length;
string_length = length - string_length - 1;
- log = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_length, ENC_ASCII);
+ log = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_length, ENC_UTF_8);
/* New line characters convert to spaces to ensure column Info display one line */
if (pref_one_line_info_column) {
@@ -175,7 +175,7 @@ dissect_logcat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
*c = ' ';
}
- subitem = proto_tree_add_item(maintree, hf_logcat_log, tvb, offset, string_length, ENC_ASCII | ENC_NA);
+ subitem = proto_tree_add_item(maintree, hf_logcat_log, tvb, offset, string_length, ENC_UTF_8 | ENC_NA);
subtree = proto_item_add_subtree(subitem, ett_logcat_log);
next_tvb = tvb_new_subset_length(tvb, offset, string_length - 1);
@@ -264,12 +264,12 @@ proto_register_logcat(void)
},
{ &hf_logcat_tag,
{ "Tag", "logcat.tag",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ FT_STRINGZ, STR_UNICODE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_logcat_log,
{ "Log", "logcat.log",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ FT_STRINGZ, STR_UNICODE, NULL, 0x00,
NULL, HFILL }
}
};