Skip to content

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

@RenjiSann

Description

@RenjiSann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions