[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-
From: |
Erik Auerswald |
Subject: |
[BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8) |
Date: |
Thu, 23 Jun 2022 09:40:00 +0200 |
Hi all,
while looking at the binning issues reported by Andreas Schamanek[0] I
noticed that providing floating point numbers as bin sizes does not work
when using a locale where comma (',') is used as decimal separator:
$ echo $LC_NUMERIC
de_DE.UTF-8
$ locale -k LC_NUMERIC
decimal_point=","
thousands_sep="."
grouping=3;3
numeric-decimal-point-wc=44
numeric-thousands-sep-wc=46
numeric-codeset="UTF-8"
$ echo 1,15 | datamash bin:0,1 1
datamash: missing field for operation ‘bin’
Escaping the comma with a backslash ('\,') does not work:
$ echo 1,15 | datamash bin:0\\,1 1
datamash: invalid operand ‘\\,1 1’
$ echo 1,15 | datamash 'bin:0\,1' 1
datamash: invalid operand ‘\\,1 1’
Just using a period ('.') as decimal separator for the bin size does
not work either:
$ echo 1,15 | datamash bin:0.1 1
datamash: invalid operand ‘.1 1’
Using a locale where a period ('.') is used as decimal separator works:
$ echo 1.15 | env LC_NUMERIC=C datamash bin:0.1 1
1.1
So far I have only explored the problem, I have not yet looked at
the code.
Br,
Erik
[0] https://lists.gnu.org/archive/html/bug-datamash/2022-06/msg00024.html
- [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8),
Erik Auerswald <=
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Tim Rice, 2022/06/23
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Tim Rice, 2022/06/24
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Tim Rice, 2022/06/24
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Tim Rice, 2022/06/24
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Erik Auerswald, 2022/06/24
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Tim Rice, 2022/06/24
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Tim Rice, 2022/06/25
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Erik Auerswald, 2022/06/25
- Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Erik Auerswald, 2022/06/26
Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8), Erik Auerswald, 2022/06/24