Solved

Mac OSX Lion: Problems with Umlauts and ISO8859

Posted on 2011-09-12
6
548 Views
Last Modified: 2012-05-12
Hello Experts,

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

Open in new window

then take a peek at the archive:

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

Open in new window


note that the "ä" is displayed correctly

I then unpack the archive with

tar xvf backup.tar home/frank

Open in new window


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 

Open in new window

I've unpacked the archive on Linux and Unixware machines - no problems. Could it be something with HFS+?

Thanks!
0
Comment
Question by:alpha-lemming
  • 4
  • 2
6 Comments
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 36525482
Not all programs are compiled against same language libraries
http://hintsforums.macworld.com/showthread.php?t=81848

You can try pax and 7z as alternatives to tar. they may do better or worse, but try.
0
 

Author Closing Comment

by:alpha-lemming
ID: 36920509
Tried several other utilities, 7zip, build gnu tar from source, didn't help.
0
 
LVL 61

Expert Comment

by:gheist
ID: 36921192
LANG=C pax -x file.tar
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 61

Expert Comment

by:gheist
ID: 36921200
0
 

Author Comment

by:alpha-lemming
ID: 36922743
hmm, when pax encounters one of the files i question, it spits out

pax: Invalid header, starting valid header search

and skips extracting the file.
0
 
LVL 61

Expert Comment

by:gheist
ID: 36922767
Does setting encoding to win1252 help?

You might need gnu tar and/or pax to extract non-posix TAR files (with non-ascii characters)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Apple's Mac OS X has become an official member of the malware club. The Flashback Trojan has affected over half million Macs, worldwide. It is behavior that ultimately gets malware onto a person’s computer. Obsolete or out-of-date software helps…
iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now