10.4: Character conversion with textutil

Mar 16, '06 06:22:00AM

Contributed by: fitzgunnar

Everyt ime I have come across hints about textutil, I have tried to use it for converting text files between different character encodings.

According to the documentation, textutil should be perfect for this. However, it has never worked. Until now. It seems like the -format and -convert flags must be specified, too. This example converts a macroman encoded file to latin-1:

textutil -format txt -inputencoding macintosh -convert txt \
 -encoding iso-8859-1 mytextfile.txt

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060314074720146