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: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 31 Mar 2011 14:45:51 -0700
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.