Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] non English characters

Date Prev · Date Next · Thread Prev · Thread Next
From: Maxim Uvarov <muvarov@xxxxxxxxx>
Date: Fri, 1 Apr 2011 00:11:15 -0700
2011/3/31 Guy Harris <guy@xxxxxxxxxxxx>:
>
> On Mar 31, 2011, at 12:16 PM, Maxim Uvarov wrote:
>
>> Thanks. Can you please point me to function(or file) were it puts dots
>> instead of real chars?
>
> print_hex_data_buffer(), in print.c.
>
> Note that you *CANNOT* make this work just by changing
>
>                line[k++] = c >= ' ' && c < 0x7f ? c : '.';
>
> not to map all bytes with the 8th bit set to '.'.  If you're trying to make 8-bit characters from, say, ISO 8859-5 or a KOI-8 character set display properly, you will have to translate those characters from the character encoding in question to UTF-8, and insert the UTF-8 octet sequence into the line buffer, because GTK+ expects to be handed UTF-8 strings.  That would require you to make the line buffer bigger, as the current size is based on the assumption that each line has 1 character position per byte.

Thanks. In general with console thark it works ok. Some clean up is
needed to change ^M symbols and probably others. But it's definitely
what do I need.

-- 
Best regards,
Maxim Uvarov