Re: CVS commit: src/external/bsd/libarchive/dist/libarchive

Martin Husemann <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
On Mon, Aug 24, 2026 at 09:23:56AM -0400, Greg Troxel wrote:
> What kind of conversions do you think are happening with libarchive, and
> why do you think those conversions are a good idea?  (Genuine question;
> I am fuzzy about beyond-ascii in filenames in general)

The way (I think) bsdtar and libarchive are structured, the filename
conversion (depending on locale) happens in a totaly different part
from the storage/decoding.

Many other archive formats (e.g. zip, rar and pax) define UTF8 as internal
file name encoding, so assuming that for the undefined parts of ancient
things like ustar is a (maybe unpopular but) reasonable choice.

While the unix-ish interpretation that mouse potinted at is great
when using the archive in the same context it was created, it
forces other extractors to guess the encoding, which is pretty bad.

I am one of the few remaining users (I guess) of non-ASCII and non-UTF8
locales. And one day I will go (of course not verbatim; have a script
go) through all files stored on my NASes and rename them from
ISO-8859-1 to UTF8.

Untill then I will have to live with e.g. "unrar" failiing to extract
archives with filenames containing funny printing marks or air quotes
(or I guess emojies). Workaround: temporarily set LC_CTYPE to UTF8
and manually rename afterwards.


Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.