bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-31 Thread Paul Eggert
Thank you for working on this. Your points are well taken. One tiny comment: + if (basic_numeric_field) +{ + if (thousands_sep_ignored) This might be better combined as "if (basic_numeric_field && thousands_sep_ignored)", so that it's more similar to the previous "if".

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-31 Thread Pádraig Brady
On 11/10/2021 02:54, Pádraig Brady wrote: On 11/10/2021 00:34, Paul Eggert wrote: The warnings look good, except that this one:   $ printf '1.0\n0.9\n' | sort -s -k1,1g --debug   sort: numbers use ‘.’ as a decimal point in this locale   0.9   ___   1.0   ___ seems overkill

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-10 Thread Pádraig Brady
On 11/10/2021 00:34, Paul Eggert wrote: The warnings look good, except that this one:   $ printf '1.0\n0.9\n' | sort -s -k1,1g --debug   sort: numbers use ‘.’ as a decimal point in this locale   0.9   ___   1.0   ___ seems overkill if we're in the C locale. Also, shouldn't simila

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-10 Thread Pádraig Brady
On 10/10/2021 22:20, Bernhard Voelker wrote: On 10/10/21 19:57, Pádraig Brady wrote: sort: numbers use ‘.’ as a decimal point in this locale What about adding the hint to that message that this an "ambiguity warning"? sort: ambiguity warning: numbers use ‘.’ as a decimal point in thi

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-10 Thread Paul Eggert
The warnings look good, except that this one:   $ printf '1.0\n0.9\n' | sort -s -k1,1g --debug   sort: numbers use ‘.’ as a decimal point in this locale   0.9   ___   1.0   ___ seems overkill if we're in the C locale. Also, shouldn't similar diagnostics be generated if the field separat

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-10 Thread Paul Eggert
On 10/10/21 2:20 PM, Bernhard Voelker wrote: What about adding the hint to that message that this an "ambiguity warning"? I don't think it's ambiguous (merely confusing :-).

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-10 Thread Bernhard Voelker
On 10/10/21 19:57, Pádraig Brady wrote: >sort: numbers use ‘.’ as a decimal point in this locale What about adding the hint to that message that this an "ambiguity warning"? sort: ambiguity warning: numbers use ‘.’ as a decimal point in this locale (Likewise for the other cases, of cours

bug#51011: [PATCH] sort: --debug: add warnings about radix and grouping chars

2021-10-10 Thread Pádraig Brady
On 09/10/2021 23:29, Paul Eggert wrote: On 10/9/21 5:00 AM, Pádraig Brady wrote: On 09/10/2021 04:48, Paul Eggert wrote: 'sort' could determine the group sizes from the locale, and reject digit strings that are formatted improperly according to the group-size rules. (Not that I plan to write