#416701 cpio -tv vs. UTF-8 filenames

Package:
cpio
Source:
cpio
Description:
GNU cpio -- a program to manage archives of files
Submitter:
Dan Jacobson
Date:
2025-08-11 16:57:02 UTC
Severity:
wishlist
Tags:
#416701#5
Date:
2007-03-29 17:40:12 UTC
From:
To:
Package: cpio
Version: 2.6-17
Severity: minor
Tags: upstream

With -t, adding -v causes one's UTF-8 filenames to become octal _with
no switch available to correct the situation!_

$ bzcat 04.bz2|cpio -t|tail -3
366 blocks
高雄縣警察局林園分局
高雄縣警察局湖內分局
高雄縣警察局鳳山分局
$ bzcat 04.bz2|cpio -tv|tail -3
366 blocks
-rw-r--r--   1 jidanni  jidanni        64 Aug 31  2006 \351\253\230\351\233\204\347\270\243\350\255\246\345\257\237\345\261\200\346\236\227\345\234\222\345\210\206\345\261\200
-rw-r--r--   1 jidanni  jidanni        85 Aug 31  2006 \351\253\230\351\233\204\347\270\243\350\255\246\345\257\237\345\261\200\346\271\226\345\205\247\345\210\206\345\261\200
-rw-r--r--   1 jidanni  jidanni        46 Aug 31  2006 \351\253\230\351\233\204\347\270\243\350\255\246\345\257\237\345\261\200\351\263\263\345\261\261\345\210\206\345\261\200

#416701#8
Date:
2007-03-30 18:15:19 UTC
From:
To:
print_name_with_quoting() unconditionally escapes filename characters
outside the range (c > 040 && c < 0177).  Since it's doing this one
octet at a time, iswprint() can't be used to do this in a way friendly
to any multi-byte character sets.

Adding a switch to disable the escaping, and doing lookaheads for wide
characters would both seem potentially disadvantageous.

#416701#13
Date:
2007-03-31 09:51:49 UTC
From:
To:
Dan Jacobson <jidanni@jidanni.org> wrote:

Thanks for reporting. I'll fix it.

Regards,
Sergey

#416701#32
Date:
2025-08-11 16:55:15 UTC
From:
To:
This was fixed in upstream version 2.13 (upstream commit
cb76d31808b47783cb0bdac694db5643d1a23b4e).