Alternative to “luit” which is available via homebrew

encodinghomebrewterminal

I have a few legacy commands which I need to run in the terminal. Unfortunately they only work with ISO-8859-1 encoding being used.

For now I manually switch the terminal encoding, but that bugs me. On Linux I use luit, which can convert the in- and output from utf-8 to iso and vice versa (transparently for the run command).

Is there something similar for OS X, preferably available through homebrew or available as binary?

Greetings
-Sascha-

Best Answer

You can install XQuartz as a binary from http://xquartz.macosforge.org. It's the de facto standard X11 for OS X. It comes with luit and all the normal X11 stuff.

Homebrew does not have an X11 installer; it expects you tu use XQuartz, and will compile against it when it is present.

You could also use AppleScript to programmatically change your Terminal settings instead of doing it manually.