This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Hi.

I am trying to patch a home made plugin. To summarize, a xml file describes message format and the plugin manages to decode the messages.

I have some messages containing some string coded in UTF-8. It works fine. I just have to write in my xml that I have to decode a FT_STRING .

Now, I have some new messages that are coded in UTF-16 If I use a FT_STRING, it just prints the first character (stop at the first 000 encountered)

The plugin calls proto_tree_add_item. I dont't find any other type that FT_STRING that could support UTF-16 I am using 1.6.0rc2 I can use a more recent version if needed.

Thanks

asked 09 Jan '12, 01:34

blinde's gravatar image

blinde
6224
accept rate: 0%


As glib internaly uses UTF-8 encoding you will have to convert the string yourself tvb_get_unicode_string() or tvb_get_ephemeral_unicode_string() may be of help or use somting from http://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html Regards Anders

permanent link

answered 09 Jan '12, 22:39

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×3
×1

question asked: 09 Jan '12, 01:34

question was seen: 2,533 times

last updated: 09 Jan '12, 22:39

p​o​w​e​r​e​d by O​S​Q​A