ace archives and unace-nonfree

well you’ve gotta love ace archives, there’s actually still people using it ;)
i received one today and wenn trying to unace in my linux i get (with t as parameter to verify the archive):
munzli@freddy:~$ unace t archive.ace
UNACE v1.2 public version

Processing archive: archive.ace

Authenticity Verification:
created on 31.3.2002 by Laudahn

File compressed with unknown method. Decompression not possible.

Error occurred

well after searching around i found out that there is a nonfree version of unace. how handy. it’s located in the multiverse repository of gutsy and can be installed with:
sudo apt-get install unace-nonfree

now you’ve got the unace version that will decompress my archive and another version named “unace-free”. i’m not sure why they named it the other Moneygram fees way around in the repos, but it works…

iconv script for converting character encodings

well the whole character encoding problems in the german language with utf-8 and iso-8859-1 is pretty tedious. a fine little program called iconv does the whole encoding changes pretty nicely but… (well there had to be a but huh?) you can’t switch encodings with input and output being the same file.
so moving/deleting/renaming makes it a little painfull.

i wrote a little script that does this for me, it’s really simple but simplifies everything.

# Convert arguments handle different encodings
iconv -f $1 -t $2 "$3" -o "$3-new"
# Create backup
mv "$3" "$3~"
mv "$3-new" "$3"

i called it “econv” and instead of:
iconv -f iso-8859-1 -t utf-8 myfile.txt -o myfile_new.txt

then deleting the old file and renaming the new one, i just type:
econv iso-8859-1 utf-8 myfile.txt

which does the trick and even creates a “myfile.txt~” backup of the original.

put the script in your /usr/local/bin or whatever you prefer and you can use it globally.