bug-datamash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.


From: Erik Auerswald
Subject: Re: [BUG] fractional bin sizes do not work in some locales (e.g., de_DE.UTF-8)
Date: Sat, 25 Jun 2022 00:53:46 +0200

Hi Tim,

On Fri, Jun 24, 2022 at 10:35:25PM +0000, Tim Rice wrote:
> >So we have two problems:
> >
> >* GNU Datamash does not respect LC_NUMERIC for *any* functions,
> >of which `bin` is just a special case.

I don't think so, using LC_NUMERIC has worked well for me in the past.

I use the following locale setting all the time:

    $ locale
    LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC=de_DE.UTF-8
    LC_TIME=de_DE.UTF-8
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY=de_DE.UTF-8
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER=de_DE.UTF-8
    LC_NAME=de_DE.UTF-8
    LC_ADDRESS=de_DE.UTF-8
    LC_TELEPHONE=de_DE.UTF-8
    LC_MEASUREMENT=de_DE.UTF-8
    LC_IDENTIFICATION=de_DE.UTF-8
    LC_ALL=

It might be important that LC_ALL is not set.

> >* The `bin` operation furthermore does not respect any non-default
> >locale for decimal separators.

I suspect the operation parsing code, but have not yet looked at it.

> I've sent up commit e0d2ad1 with a preliminary datamash-i18n-de.pl test
> to show what currently works and provide TODO notes for what does not.

I think this needs a way to check whether the locale is actually
available.  IIRC GNU Coreutils has locale-specific tests that do check
if the needed locale is available and if not skips the test.  IIRC one
of their tests uses a locale I did not have installed and the test
was skipped.

I am not sure about the significance of the different spellings, both
de_DE.UTF-8 and de_DE.utf8 (and en_US.UTF-8 / en_US.utf8) work for me.

I'll try to look into this during the weekend, I am going to sleep now.

Good night,
Erik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]