bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-cpio] cpio -tv: Non ASCII-only users cannot see both the names and


From: 積丹尼 Dan Jacobson
Subject: [Bug-cpio] cpio -tv: Non ASCII-only users cannot see both the names and dates!
Date: Wed, 06 Jan 2016 10:41:18 +0800

We read

`-v'
`--verbose'
     List the files processed, or with `-t', give an `ls -l' style
     table of contents listing.  In a verbose table of contents of a
     ustar archive, user and group names in the archive that do not
     exist on the local system are replaced by the names that
     correspond locally to the numeric UID and GID stored in the
     archive.

Does `ls -l' mangle unicode filenames into octal \XXX mess?

Non ASCII-only users cannot see both the names and dates!

Can you believe one has to use ascii2uni:
cpio -tv|ascii2uni -a K
-rw-r--r--   1 jidanni  jidanni      5488 Dec 29 17:04 保費計費明細_1041229.html
-rw-r--r--   1 jidanni  jidanni      3586 Dec 29 17:04 保險費繳納明細_1041229.html
-rw-r--r--   1 jidanni  jidanni      4250 Dec 29 17:04 健保卡狀況及領卡紀錄_1041229.html

else the names become \344\277\235\350\262\273\350\...

Or he is not allowed to use -v, and thus can only see names and not the
modified times!

Here is one comparison program that I had to modify, adding ascii2uni,

k=/tmp/myshutdownDIFFs
for i in $(find /cf/updates/cpiome.*.cpio.gz)
do
    set -- $(zcat $i|cpio -tv 2>/dev/null|ascii2uni -q -a K)
    echo $@
    env - ls -dl $9
done|tr -s ' '|uniq -u|tee $k
if test -s $k
then
    beep -f 1000 -r 2 -n -r 5 -l 10 --new
    echo ANYTHING BAD? Didn\'t xcpiome some file? Fix, else hit RET
    read
fi

So please add some other setting to show the Unicode filenames
unmolested, and perhaps make it the default!

cpio (GNU cpio) 2.11

P.S., tar -vt doesn't have such problems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]