Skip to content

cksum: Properly escape non-UTF8 filenames in STDERR #6892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RenjiSann opened this issue Nov 27, 2024 · 1 comment
Open

cksum: Properly escape non-UTF8 filenames in STDERR #6892

RenjiSann opened this issue Nov 27, 2024 · 1 comment
Labels
J - Encoding encoding (UTF-8, UTF-16) related issue U - cksum

Comments

@RenjiSann
Copy link
Collaborator

As mentioned in #6573

A corner case that is yet to be addressed is when a non-utf8 filename does not exist and it is escaped before being displayed

$ ../../../gnu/src/cksum -c CHECKSUM                 
../../../gnu/src/cksum: 'XXX'$'\377''XXX': No such file or directory    # escaped
XXXXXX: FAILED open or read
../../../gnu/src/cksum: WARNING: 1 listed file could not be read

$ ../../target/debug/cksum -c CHECKSUM                                 
../../target/debug/cksum: XXX�XXX: No such file or directory           # not escaped
XXXXXX: FAILED open or read
../../target/debug/cksum: WARNING: 1 listed file could not be read
@RenjiSann
Copy link
Collaborator Author

This is a specific application of #6817

@RenjiSann RenjiSann added the J - Encoding encoding (UTF-8, UTF-16) related issue label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
J - Encoding encoding (UTF-8, UTF-16) related issue U - cksum
Projects
None yet
Development

No branches or pull requests

2 participants