sort: in UTF-8 locales, lines differing only in punctuation are ordered unlike GNU
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cli, rust
- Lĩnh vực
- cli, localization
Hướng nghiên cứu
Start with init_locale_collation in src/uucore/src/lib/features/i18n/collator.rs and compare the ICU collation behavior with the GNU examples in the issue. Check related issues #12542, #12677, and #16237 for prior collation decisions. Done means punctuation ties follow GNU's order and sort -c accepts GNU-sorted input in the reported UTF-8 locale.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In en_US.UTF-8, both sorts ignore punctuation at the first level, but they
break the tie differently:
$ printf "a.\na'\na-\n" | LC_ALL=en_US.UTF-8 sort
GNU (9.10, glibc 2.43):
a'
a-
a.
uutils (main, 293a724eb):
a-
a.
a'
With more punctuation, GNU's order is the code point order, and ours looks like
the CLDR/ICU order:
$ printf "a'\na-\na.\na,\na_\na!\na?\na:\na;\na/\n" | LC_ALL=en_US.UTF-8 sort | paste -sd' '
GNU: a! a' a, a- a. a/ a: a; a? a_
uutils: a_ a- a, a; a: a! a? a. a' a/
Because of this, sort -c disagrees with GNU on GNU-sorted input:
$ printf "a'\na-\na.\n" | LC_ALL=en_US.UTF-8 sort -c
sort: -:2: disorder: a- # uutils, exit 1; GNU accepts it (exit 0)
On a real word list (/usr/share/dict/words), 19 lines end up in a different
place (e.g. a', A&M).
init_locale_collation (src/uucore/src/lib/features/i18n/collator.rs) uses
ICU with AlternateHandling::Shifted and Strength::Quaternary, so punctuation
is compared at the quaternary level, in ICU's order of variable characters.
Related: #12542 / #12677 (hyphen at the first level, fixed) and #16237 (symbols
at the first level). This one is about the order among punctuation once the
rest is equal.
Note: GNU takes its order from glibc's locale data. Checked 2026-11-18: same
code point order with GNU sort 9.4/glibc 2.39 (Ubuntu 24.04), 9.7/2.41 (Debian
trixie), 9.7/2.43 (Ubuntu 26.04 gnusort) and 9.10/2.43 (Fedora). Ubuntu 26.04's
default sort (uutils 0.10.0) gives our order.
- Ngôn ngữ chính
- Rust
- Star
- 24.4k
- Fork
- 2.2k
- Merge trung bình
- 2 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 402
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của uutils/coreutils
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
split -n leaves bytes from a previous run in chunks that should be emptyCó thể đã có người làm @costajohnt đã nhận 2 ngày trước. Đang mởU - split
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
dircolors: '=' is not escaped and '^'/'\\' do not toggle the backslash state, unlike GNUCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởU - dircolors
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
U - shred
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chown -v: `+ID` spec echoed verbatim on a broken symlinkCó thể đã có người làm @sunsss123soldier đã nhận 7 ngày trước. Đang mởgood first issue oss-scanner U - chown
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của uutils/coreutils
Issue tương tự
-
go good first issue test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug triaged tui ux wontfix
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
bevyengine/bevy#26642 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày