Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Feb 2018 11:44:39 -0700
From:      "Dale Scott" <dalescott@shaw.ca>
To:        "'Christian Weisgerber'" <naddy@mips.inka.de>, <freebsd-questions@freebsd.org>
Subject:   RE: freebsd tar fails but not gtar ?!?
Message-ID:  <00ff01d39eb1$62977750$27c665f0$@shaw.ca>
In-Reply-To: <slrnp7c3gh.29cu.naddy@lorvorc.mips.inka.de>
References:  <00d101d399eb$318a7c40$949f74c0$@shaw.ca> <slrnp7c3gh.29cu.naddy@lorvorc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-02-03 Christian Weisgerber <naddy@mips.inka.de> 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
name
> 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
is
> not documented.  My best guess is that it tries to iconv(3) path names
from
> the current locale encoding to UTF-8.  If the path names are have an
invalid
> 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
talking
> 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

---
Dale R. Scott, P.Eng.
http://www.dalescott.net







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00ff01d39eb1$62977750$27c665f0$>