sort: in UTF-8 locales, lines differing only in punctuation are ordered unlike GNU
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cli, rust
- 領域
- cli, localization
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 24.4k
- フォーク
- 2.2k
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 402
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
split -n leaves bytes from a previous run in chunks that should be empty対応中かも @costajohnt が 2 日前に担当しました。 オープンU - split
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
dircolors: '=' is not escaped and '^'/'\\' do not toggle the backslash state, unlike GNU再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンU - dircolors
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
U - shred
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
chown -v: `+ID` spec echoed verbatim on a broken symlink対応中かも @sunsss123soldier が 7 日前に担当しました。 オープンgood first issue oss-scanner U - chown
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
S: Untriaged T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
libnyanpasu/clash-nyanpasu#6537 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 62/100
tauri-apps/tao#1445 ·
メンテナーはふだん 1 日以内に返信
-
bug P3
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
go good first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信