sort --debug: key underlines are misaligned with control and multibyte characters
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start with the sort --debug implementation and the sort-debug-keys test in test_sort.rs; compare the annotation widths for control characters and multibyte characters under C and UTF-8 locales. The issue points to EXPECTED_DEBUG_KEY_ANNOTATION_LOCALE and LOCALE_FR_UTF8 as relevant test references. Done means debug underlines and indents match display-column behavior; an open linked pull request (#16079) already addresses this issue.
索引モデルが issue の本文から書いたものです。
説明
sort --debug measures the key underline and its indent in bytes (ignoring only NUL). GNU measures them in display columns: control characters take no column, the tab (printed as >) takes one, and in a UTF-8 locale each character takes its display width.
$ printf 'a\x01b\n' | LC_ALL=C sort --debug 2>/dev/null
a^Ab
__ # GNU
___ # uutils
$ printf 'é日 b\n' | LC_ALL=en_US.UTF-8 sort --debug -k2 -k1,1 2>/dev/null
é日 b
__ # GNU: indent 3 (é=1, 日=2)
___
_____
# uutils counts bytes: the key-2 underline is indented 5,
# and the next two underlines are 5 and 7 wide
The UTF-8 case is what GNU's sort-debug-keys test expects for 1² in fr_FR.UTF-8 (EXPECTED_DEBUG_KEY_ANNOTATION_LOCALE in test_sort.rs has a 23-wide underline where the C locale has 24). That test only runs when LOCALE_FR_UTF8 is set.
Checked on uutils main 824cdb271 against GNU coreutils 8.32.
- 主要言語
- Rust
- スター
- 24.3k
- フォーク
- 2.1k
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 396
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
pr: -o/--indent does not pad the header line対応中かも @emirmrkaljevic が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
realpath: empty operand aborts with a garbled error instead of being reported as missing対応中かも @emirmrkaljevic が 1 日前に担当しました。 オープンU - realpath
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
nl: section delimiters reset --join-blank-lines grouping対応中かも @coracoracora が 2 日前に担当しました。 オープンU - nl
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
uutils/coreutils#16130 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
uniq: overflowing -f/-s/-w values with trailing garbage are silently accepted対応中かも @huuan26 が 3 日前に担当しました。 オープンU - uniq
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
bug i18n priority: medium ui
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
storytold/craft-anything#983 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Dinnerbone/Rascal#91 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
higress-group/HiRoute#405 ·
メンテナーはふだん 1 日以内に返信
-
rust_analyzer flycheck: no CLI way to enable clippy from `check.overrideCommand`対応中かも @TrapsterDK が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
bazelbuild/rules_rust#4392 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信