2

I have a tar archive created on an old Unixware machine using ISO8859-1 encoding. When I try to extract it under Macosx Lion, I experience a bit of weirdness with German umlauts. For instance:

I open a terminal.app window with the encoding set to "ISO8859-1" and set my locale like this:

export LANG=de_DE.ISO8859-1
export LC_ALL=de_DE.ISO8859-1

then take a peek at the archive:

dhcp202:Downloads frank$ tar tvf backup.tar home/frank
x home/frank/
x home/frank/Präferenzen/

note that the "ä" is displayed correctly

I then unpack the archive with

tar xvf backup.tar home/frank

the "ä" is also displayed correctly in the output from tar, but when I list the directory contents, I see:

dhcp202:Downloads frank$ ls home/frank
Pr%E4ferenzen 

What's up with that?

3
  • What is the result from file -I {filename}? Sep 12, 2011 at 9:34
  • application/x-directory; charset=binary Sep 12, 2011 at 9:47
  • I tried the same archive, same actions on a Linux box and a Unixware7 box, without any trouble. Seems to only happen on the mac. Maybe HFS+ has a problem with ISO8859? Sep 12, 2011 at 15:21

1 Answer 1

1

Filenames on HFS+ are in UTF-8 format, not in any other encoding (well, except MacRoman for old files). You can see code related to that in the kernel source; for example, in getdirentries_callback() in hfs_catalog.c.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .