From owner-freebsd-arch@FreeBSD.ORG Wed Dec 8 21:03:39 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 792BD10656A8 for ; Wed, 8 Dec 2010 21:03:39 +0000 (UTC) (envelope-from gprspb@mail.ru) Received: from fallback1.mail.ru (fallback1.mail.ru [94.100.176.18]) by mx1.freebsd.org (Postfix) with ESMTP id 2ECA98FC35 for ; Wed, 8 Dec 2010 21:03:38 +0000 (UTC) Received: from smtp15.mail.ru (smtp15.mail.ru [94.100.176.133]) by fallback1.mail.ru (mPOP.Fallback_MX) with ESMTP id 381681D8E194 for ; Wed, 8 Dec 2010 23:44:51 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=uPjHu/ZAXRrgZfyLcQC+flQVSFLr7K0t/+XS9F3Vi3k=; b=beG2E/OJKEOtUb+X8OpQuJ1MwNs9ymg9oTLMtjGOVyacIJr6cI5zdrNIENapAhagKR9O4CWfKWfQDav5DWoU+U4D8+h1AYXrh1LRD+0WHtNUdtsZHLs9HZh4qUvCnTgw; Received: from [93.185.182.46] (port=9715 helo=gpr.nnz-home.ru) by smtp15.mail.ru with asmtp (TLSv1:AES256-SHA:256) id 1PQQsc-0000X6-00 for freebsd-arch@freebsd.org; Wed, 08 Dec 2010 23:44:50 +0300 Received: from gpr by gpr.nnz-home.ru with local (Exim 4.72) (envelope-from ) id 1PQQra-0000UO-EU for freebsd-arch@freebsd.org; Wed, 08 Dec 2010 23:43:46 +0300 Date: Wed, 8 Dec 2010 23:43:46 +0300 From: Gennady Proskurin To: freebsd-arch@freebsd.org Message-ID: <20101208204346.GA1762@gpr.nnz-home.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Mras: Ok Subject: bsdtar and locale X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2010 21:03:39 -0000 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.