Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 23:43:46 +0300
From:      Gennady Proskurin <gprspb@mail.ru>
To:        freebsd-arch@freebsd.org
Subject:   bsdtar and locale
Message-ID:  <20101208204346.GA1762@gpr.nnz-home.ru>

next in thread | raw e-mail | index | archive | help

bsdtar (which is default "tar" in freebsd) treats file/directory names in
locale-dependent manner. For example, if you archive some file with utf-8 name
in "C" locale (env LC_ALL=C tar -c ...), and then extract it in some UTF-8
locale, it's name will be corrupted. Such a behaviour is somewhat documented in
archive_entry(3) and bsdtar(1) manpages, so this is not a bug, but feature.

I agree, such conversions can be usefull in some cases, but should be disabled
by default (we are unix, filenames are just binary data).
It is very annoying, it makes you to always think about locales while creating
and extracting archive.

For now, I use gtar for backups to avoid such a problems.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101208204346.GA1762>