I've introduced a new function called tvb_get_ephemeral_unicode_string()
for converting UTF-16 strings in a tvbuff to UTF-8 for display in
Wireshark. This new function even works with tshark (at least on Unix)
if using a UTF-8 compatiable terminal emulator:
SMB 194 Trans2 Request, QUERY_PATH_INFO, Query File Basic Info,
Path: \stephen.fisher\t�st.txt
Otherwise, the UTF-8 is mangled:
SMB 194 Trans2 Request, QUERY_PATH_INFO, Query File Basic Info,
Path: \stephen.fisher\tést.txt
(see next rev, 35254, for my proof of concept change to use this
function in the SMB dissector)
On Thu, Dec 23, 2010 at 05:59:37PM +0000, sfisher@xxxxxxxxxxxxx wrote:
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=35253
>
> User: sfisher
> Date: 2010/12/23 09:59 AM
>
> Log:
> Introduce new function called tvb_get_ephemeral_unicode_stringz(), which
> is a unicode (UTF-16) version of tvb_get_ephemeral_stringz(). It scans
> a tvbuff for a UTF-16 string and converts it to UTF-8 upon return.
>
> Directory: /trunk/doc/
> Changes Path Action
> +7 -0 README.developer Modified
>
> Directory: /trunk/epan/
> Changes Path Action
> +68 -0 tvbuff.c Modified
> +3 -0 tvbuff.h Modified
>
> ___________________________________________________________________________
> Sent via: Wireshark-commits mailing list <wireshark-commits@xxxxxxxxxxxxx>
> Archives: http://www.wireshark.org/lists/wireshark-commits
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
> mailto:wireshark-commits-request@xxxxxxxxxxxxx?subject=unsubscribe