mutt, ελληνικά, greeklish, OpenBSD and the Mac OS X Terminal
Just teached the mutt to autoconvert ISO-8859-7 Greek to "greeklish". On my Mac OS X PowerBook utf-8 works fine with Terminal.app and mutt, but when I use the mutt on my OpenBSD server (through ssh and Terminal.app) I get a mess. Now I can have all this transliterated to (fake, ugly, but working) greeklish. Read on...
The recipe so far consists of:
An example mailcap file with entries for text/plain encodings. From this I created 2 new lines in my mailcap file (~/.mutt/mailcap):
text/plain; gr2gr -l ; \
test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-7; \
copiousoutput
text/plain; cat ;copiousoutput
These will pipe text/plain content with iso-8859-7 encoding through gr2gr. I also had to put the line:
auto_view text/plaininto my muttrc file.
Next was of course this program "gr2gr", which is a perl script I found mentioned on the hellenic-howto. Download link is: ftp://ftp.hri.org/pub/greek/programs/gr2gr.prl.
Result:
Subject: Greek
Date: Wed, 23 Mar 2005 16:55:31 +0200
X-Mailer: Apple Mail (2.619.2)
[-- Autoview using gr2gr -l --]
Ta ellhnika einai polu eukola!
Update: I'm now using my own python Greek to Greeklish converter, which does Unicode UTF-8 too