Bad CSV output

Gilles Duboscq duboscq at ssw.jku.at
Thu Jan 9 07:20:47 PST 2014


Regardless of the locale reported by "locale" in the terminal, are you sure
that the decimal separator is not set to a coma in System
Preferences>Language & Region>Advanced Settings?

Anyway, the only thing JMH could do is use ';'
when DecimalFormatSymbols.getInstance().getDecimalSeparator() is ',' and
use DecimalFormat.getInstance() to format the numbers. But whether CSV
should be locale dependent or not is probably a subject for eternal debate.

-Gilles


On Thu, Jan 9, 2014 at 3:58 PM, Julien Ponge <julien.ponge at insa-lyon.fr>wrote:

> I made an export of a spreadsheet from Numbers and I found the catch :-)
>
> :%s/,/;/g
>
> does the trick on JMH CSV.
>
> May I suggest to change to ';' unless the RFC has something smart in
> favour of ','?
>
> - Julien
>
> On 09 Jan 2014, at 15:51, Aleksey Shipilev <aleksey.shipilev at oracle.com>
> wrote:
>
> > On 01/09/2014 06:45 PM, Julien Ponge wrote:
> >>> Do you have the same problems with the golden CSV file [1]? If not, are
> >>> there trivial massagings (e.g. dos2unix/unix2dos, "Import as..." +
> >>> different set of delimiters) to the file help?
> >>
> >> Yes, same with this file :-/
> >>
> >> I Vim'ed it, :set fileformat=dos, but it still opens as a single column.
> >
> > Then I don't think it is the JMH fault, since we meet the de-facto
> > standard for CSV files. Are you sure your tools recognize any CSV files
> > at all? You can try to export the CSV from those tools, and open them up
> > again. It would be interesting to see what CSV they are expecting.
> >
> > -Aleksey.
> >
>
>


More information about the jmh-dev mailing list