freebsd tar fails but not gtar ?!?

Dale Scott dalescott at
Mon Feb 5 18:44:49 UTC 2018

On 2018-02-03 Christian Weisgerber <naddy at> wrote:

> How is it failing?  The "Can't translate pathname" messages you quote are
> warnings, not errors.
> > It?s been suggested that locale on the system isn?t set correctly.
> > Does this sound familiar to anyone?
> Well, when I take a file with UTF-8-encoded non-ASCII characters in its
> and tar it up in the POSIX locale, then I get the same warning.  Clearly
tar is
> trying to normalize path name encodings in some way.  Unfortunately this
> not documented.  My best guess is that it tries to iconv(3) path names
> the current locale encoding to UTF-8.  If the path names are have an
> encoding in the current locale, iconv(3) fails, prompting the warning.
> You can simply ignore the warnings.  If you extract the archive under the
> same conditions as those when you created it, the path names will be just
> fine.

I'm somewhat ashamed to admit I hadn't actually checked the tar archive. You
are correct, the files with warnings are all included.

> Or you can make sure that the character encoding in your locale setting
> matches those of the file names you are backing up.  Most likely something
> like LC_CTYPE=en_US.UTF-8 will do.  If you don't understand what I'm
> about, you might want to read up on those topics.

I will try your suggestion, and yes, I definitely need to read up on locale
setting! :-)

Thanks and best regards,

Dale R. Scott, P.Eng.

More information about the freebsd-questions mailing list