I occasionally get tarballs where the filenames are encoded in ISO-8859-1 or some other pre-Unicode scheme. My system uses UTF-8, so when I untar these archives with the usual options (
tar xvf foo.tar) I end up with a directory full of mojibake filenames.
Until now I've been using
convmv to convert the filenames to UTF-8 after they've been extracted. This is a bit incovenient, because I either need to invoke
convmv on each affected file, or else untar the file into a new directory, run
convmv on the entire directory, and then move the files to where I wanted them originally. Short of coding this functionality into a shell script, is there some way of converting the archived filenames to UTF-8 on the fly, as they are being untarred?