sort -nu emits an exact duplicate and -nCu accepts it under de_DE.UTF-8

Abierto
#16,735 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Xnadir ya está trabajando en esto.

Desde el 20/11/2026.

  • #16736 de @Xnadir — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
cli

Línea de trabajo

Start with the float parsing path in src/uu/sort/src/sort.rs around lines 722–729 and the early return around lines 2859–2872, then compare whole-line -n handling with -k1,1n. Reproduce under de_DE.UTF-8 using the commands in the issue and check the pairwise -nCu comparisons. Done when sort -nu omits the duplicate 9 and sort -nCu rejects the input, matching GNU.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

U - sort

In de_DE.UTF-8 these amounts are 9, 100, 1000, and 9.

export LC_ALL=de_DE.UTF-8
amounts() { printf '%s\n' 9 100,0 1.000 9; }
amounts | sort -nu
amounts | sort -nCu
echo "$?"

uutils prints all four lines, including the second 9, and the check exits 0. GNU 9.12 prints only the first three lines and the check exits 1. On the same input, uutils sort -k1,1n -u matches GNU.

Checking each two-line pair separately with -nCu shows the cycle: uutils accepts 9 < 100,0, 100,0 < 1.000, and 1.000 < 9. GNU rejects the last pair.

The whole-line float cache reads 1.000 as 1 when compared with 9. With 100,0 the comma forces the locale-aware path, which reads 1.000 as 1000. This persists after #10339. See float parsing and the early return.

Verified on Linux x86_64 with uutils 0.12.0 and main at 95954130.

Lenguaje dominante
Rust
Estrellas
24.4k
Forks
2.2k
Merge medio
2 d 23 h
PR fusionados (30 d)
402

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de uutils/coreutils

Todos los issues de uutils/coreutils

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.