aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-etsi_card_app_toolkit.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-12-22 02:12:32 +0000
committerGuy Harris <guy@alum.mit.edu>2013-12-22 02:12:32 +0000
commit5084f58ce2ca1c1e0db771cd3649d4439ae7e4a5 (patch)
tree6bdab790e63f17b091b2f1fe990e381803f4cde3 /epan/dissectors/packet-etsi_card_app_toolkit.c
parentf9cce15b3592b60e85b22ddad97a999af350469f (diff)
We support ENC_UCS_2, so use that in proto_tree_add_item() and
tvb_get_string_enc() rather than using iconv to convert it to UTF-8. svn path=/trunk/; revision=54350
Diffstat (limited to 'epan/dissectors/packet-etsi_card_app_toolkit.c')
-rw-r--r--epan/dissectors/packet-etsi_card_app_toolkit.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/epan/dissectors/packet-etsi_card_app_toolkit.c b/epan/dissectors/packet-etsi_card_app_toolkit.c
index 182700b899..a4ba641ef5 100644
--- a/epan/dissectors/packet-etsi_card_app_toolkit.c
+++ b/epan/dissectors/packet-etsi_card_app_toolkit.c
@@ -1076,24 +1076,11 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
break;
case 0x04: /* 8bit */
+ /* XXX - ASCII, or some extended ASCII? */
proto_tree_add_item(elem_tree, hf_ctlv_text_string, tvb, pos+1, len-1, ENC_ASCII|ENC_NA);
break;
case 0x08: /* UCS2 */
- {
- GIConv cd;
- GError *l_conv_error = NULL;
- gchar *utf8_text;
-
- if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv)-1) {
- utf8_text = g_convert_with_iconv(tvb_get_ptr(tvb, pos+1, len-1), len-1, cd, NULL, NULL, &l_conv_error);
- if(!l_conv_error) {
- proto_tree_add_string(elem_tree, hf_ctlv_text_string, tvb,
- pos+1, len-1, utf8_text);
- } else {
- proto_tree_add_text(elem_tree, tvb, pos+1, len-1, "Failed to decode UCS2");
- }
- }
- }
+ proto_tree_add_item(elem_tree, hf_ctlv_text_string, tvb, pos+1, len-1, ENC_UCS_2|ENC_BIG_ENDIAN);
break;
default:
break;