Ethereal-dev: Re: [Ethereal-dev] patch for packet-ipmi.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 19 Nov 2004 12:26:41 -0800
Lane Hu wrote:
Patch
Actually, it's a new version of packet-ipmi.c; patches are preferred, as 
they work even if the file in question has changed since the patch was made:
	http://www.ethereal.com/development.html#patches

for  packet-ipmi.c to dissect various IPMI Command.
There are some non-ASCII characters in the new version of the code, for 
example, in the strings for values of 0x01 in the 
"cmd_GetSensorReading_data_ResponseDataByte3_Bit5_threshold_vals", 
"cmd_GetSensorReading_data_ResponseDataByte3_Bit4_threshold_vals", and 
"cmd_GetSensorReading_data_ResponseDataByte3_Bit3_threshold_vals" 
tables.  Unfortunately, the only "standard" character set for displaying 
are ASCII characters - GTK+ 2.x uses UTF-8, so non-ASCII characters 
could be encoded using UTF-8 for display, but that doesn't handle saving 
the dissection text to a file (where the character set might, on UN*X, 
be specified by the user's locale, and on Windows you'd either need to 
write them in the appropriate code page or write the entire file in 
Unicode), nor does it handle printing to a printer, and it doesn't 
handle GTK+ 1.2[.x] (which uses the font's encoding rather than UTF-8).
In the long term, we need to clean that up, but, for now, we should 
probably avoid using non-ASCII characters in strings used to generate 
items in the packet list and packet details.