Guy Harris
changed
bug 12500
What |
Removed |
Added |
Hardware |
x86
|
All
|
OS |
Debian
|
All
|
Comment # 1
on bug 12500
from Guy Harris
(In reply to Frank Meier from comment #0)
> Build Information:
> Gitrevision 74484c6ebf961769f8f44d8b95ebeb7532f47a93
> --
> capinfos:
> * table format: -T
> * comma as field seperator: -m
> * machine readable units: -M
> * print timestamps and average data rate
>
> When called with a german locale capinfos uses a dot as decimal mark for
> timestamps but a comma for data bit rate:
>
> $ LANG=C ./capinfos 2009-m57.00.pcap -m -M -S -a -e -i -T
> File name,Start time,End time,Data bit rate (bits/sec)
> 2009-m57.00.pcap,1258531203.914398,1258568304.881020,5227.22
> $ LANG=de_DE.utf8 ./capinfos 2009-m57.00.pcap -m -M -S -a -e -i -T
> File name,Start time,End time,Data bit rate (bits/sec)
> 2009-m57.00.pcap,1258531203.914398,1258568304.881020,5227,22
>
> I see two problems:
>
> 1) The field separator can occur inside a field. I would at least update the
> manpage to warn the user to use quoted output or a different field separator.
We need to review all places where programs in the Wireshark suite produce CSV
output to ensure that, whatever character is used as the separator, fields
using it are quoted.
(Yeah, that would cause problems with programs that read CSV data and don't
understand quoting, but those programs need to be fixed anyway.)
> 2) Parsing the output with different decimal marks causes extra work. Either
> localize all fields or none.
We also need to fix the places where we explicitly construct {integer
part}{decimal separator}{fractional part} strings, such as
time-as-a-non-integral-seconds-since-the-Epoch, to use the locale's decimal
separator if they use the locale's separator for strings constructed by other
routines - for example, if they use a printf-family routine and don't force the
C locale to be used.
You are receiving this mail because:
- You are watching all bug changes.