numfmt: non-UTF-8 filename in an unselected field prevents size conversion
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
Línea de trabajo
The default whitespace path in src/uu/numfmt/src/numfmt.rs (around lines 58-72) validates the whole line as UTF-8 before selecting fields, so start there. Reproduce with the printf command from the issue under LC_ALL=C and compare against GNU numfmt. Done when field 1 converts to 1.5k and 2.5k, the non-UTF-8 filename passes through byte for byte, and the existing numfmt tests still pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With a size in field 1 and a filename in field 2, a non-UTF-8 byte in the filename stops the entire listing.
printf '1500 caf\351.txt\n2500 notes.txt\n' | LC_ALL=C numfmt --field=1 --to=si
uutils exits 2 with empty stdout and numfmt: invalid number: '1500 caf\351.txt'. GNU exits 0, converts the sizes to 1.5k and 2.5k, and preserves the filenames byte for byte. With --invalid=ignore, uutils exits 0 but leaves the first size as 1500. Adding --delimiter=' ' gives the expected output on this input.
Verified on x86_64 Linux with uutils 0.12.0, 0.13.0, and a local build of main at 791399596cc7214e76c0c6bd022332ab6048ec65. Compared against GNU coreutils 9.7 and 9.12.
The default whitespace path validates the entire line as UTF-8 before selecting fields. https://github.com/uutils/coreutils/blob/791399596cc7214e76c0c6bd022332ab6048ec65/src/uu/numfmt/src/numfmt.rs#L58-L72
- Lenguaje dominante
- Rust
- Estrellas
- 24.4k
- Forks
- 2.2k
- Merge medio
- 2 d 23 h
- PR fusionados (30 d)
- 402
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
split -n leaves bytes from a previous run in chunks that should be emptyPosiblemente ocupada @costajohnt la tomó hace 2 días. AbiertoU - split
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
dircolors: '=' is not escaped and '^'/'\\' do not toggle the backslash state, unlike GNUQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoU - dircolors
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
U - shred
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
chown -v: `+ID` spec echoed verbatim on a broken symlinkPosiblemente ocupada @sunsss123soldier la tomó hace 7 días. Abiertogood first issue oss-scanner U - chown
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
Todos los issues de uutils/coreutils
Issues similares
-
marketing
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
S: Untriaged T: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
libnyanpasu/clash-nyanpasu#6537 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 62/100
tauri-apps/tao#1445 ·
Los mantenedores suelen responder en 1 día
-
bug P3
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
go good first issue test
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días