sort --debug: key underlines are misaligned with control and multibyte characters
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 24.3k
- Forks
- 2.1k
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 397
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de uutils/coreutils
-
pr: -o/--indent does not pad the header linePosiblemente ocupada @emirmrkaljevic la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
realpath: empty operand aborts with a garbled error instead of being reported as missingPosiblemente ocupada @emirmrkaljevic la tomó hoy. AbiertoU - realpath
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Unhelpful manual page(s)Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
nl: section delimiters reset --join-blank-lines groupingPosiblemente ocupada @coracoracora la tomó hace 1 día. AbiertoU - nl
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
uutils/coreutils#16130 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
uniq: overflowing -f/-s/-w values with trailing garbage are silently acceptedPosiblemente ocupada @huuan26 la tomó hace 3 días. AbiertoU - uniq
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
Todos los issues de uutils/coreutils
Issues similares
-
🐞 bug 🧩 bevy_gantz_egui
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nannou-org/gantz#500 ·
Los mantenedores suelen responder en 1 día
-
[Feature]: Fedora 45 repoAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
metasequoiaime/msime#10989 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fritzprix/libr-agent#2612 ·
Los mantenedores suelen responder en 1 día
-
crate: spate-core priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NSPG13/agent-bounties#1749 ·
Los mantenedores suelen responder en 1 día