Skip to content

sort -k doesn't handle locale #3123

@sylvestre

Description

@sylvestre

With bash

$ LC_ALL=fr_FR.UTF-8 locale abmon 2>/dev/null |
        tr ';' '\n'|shuf| nl| LC_ALL=fr_FR.UTF-8 sort -k2,2M
     8	janv.
     5	févr.
    12	mars
     2	avril
    11	mai
    10	juin
     4	juil.
     6	août
     3	sept.
     7	oct.
     9	nov.
     1	déc.

with rut/coreutils:

LC_ALL=fr_FR.UTF-8 locale abmon 2>/dev/null |
        tr ';' '\n'|shuf| nl| LC_ALL=fr_FR.UTF-8 ./target/debug/coreutils sort -k2,2M
     3	avril
     5	févr.
     6	juin
     8	mai
    10	juil.
    11	déc.
    12	août
     1	janv.
     2	mars
     7	sept.
     4	oct.
     9	nov.

Used in gnu tests/misc/sort-month

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions