Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1302320

Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode

From Andi Kleen <andi@firstfloor.org>
Newsgroups linux.kernel
Subject Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode
Date 2016-01-06 02:40 +0100
Message-ID <qNLeW-2Fc-17@gated-at.bofh.it> (permalink)
References <qNFjd-7by-31@gated-at.bofh.it> <qNH1E-8oZ-19@gated-at.bofh.it> <qNHbl-8sH-47@gated-at.bofh.it> <qNHkZ-5x-3@gated-at.bofh.it> <qNJd8-1kd-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> > I usually work around it by using -x\; instead
> > 
> > But the , problem should be still fixed.
> 
> Humm, what is the problem then of doing, for example in my case, with a
> LC_ALL=pt_BR, that uses commans as the decimal separator:

It's user unfriendly and unobvious. Also you end up with subtly broken
files,. And it would also change the locale of the measured program which
may not be intended.

Plus the floating point values with comma cannot be parsed by programs
that don't know your locale (that was the problem with pmu-tools)

> Using -x\; looks sane and shorter tho, perhaps even -x:, to save one
> extra char.

Even with that there is the problem that you end up with numbers that
cannot be parsed by locale unaware programs.

CSV is intended for other programs so it shouldn't be messed up like
this.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] perf, tools, stat: Force C numeric locale for CSV mode Andi Kleen <andi@firstfloor.org> - 2016-01-05 20:20 +0100
  Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode Jiri Olsa <jolsa@redhat.com> - 2016-01-05 22:10 +0100
    Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-05 22:20 +0100
      Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode Andi Kleen <andi@firstfloor.org> - 2016-01-05 22:30 +0100
        Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-06 00:30 +0100
          Re: [PATCH] perf, tools, stat: Force C numeric locale for CSV mode Andi Kleen <andi@firstfloor.org> - 2016-01-06 02:40 +0100

csiph-web