Below you'll find an example MacPerl program which uses a MIME scheme to safely transfer european language characters through email. It uses the CPAN available module MIME::Lite. Replace the addresses according to your configuration. Use your fantasy to find useful ways to input the message text and other parameters. In the moment it's some silly test text hardwired into the script. The translation tables are taken from an article written by Scott Hanson <shanson@mail.hh.provi.de> Asendorf, Germany on this mailing list. I'd like to hear about problems and possible improvements. Have fun Axel P.S.: I'm not quite sure whether MIME encoding is the right term. Actually it is the quoted-printable scheme which converts e.g. an "ö" to "=E4". To learn more read RFC2045, 2046 and the MIME::Lite documentation. ============================================================================ #!perl -w use MIME::Lite; use vars @trans; &init(); $message = "äöü ÄÖÜß, Umlaute im Mail Text"; $message = &mac2iso( $message ); $msg = new MIME::Lite From => 'me@mydomain.tld', To => 'you@yourdomain.tld', Subject => 'A MIME::Lite test message ...', Type => 'TEXT', Encoding => 'quoted-printable', Data => $message; # DEBUG # $msg->print_header( \*STDOUT ); # $msg->print_body( \*STDOUT ); MIME::Lite->send('smtp', "mailhost.mydomain.net", Timeout=>60); $msg->send; exit 0; sub mac2iso() { my( $string ) = $_[0]; $string =~ s/[\x80-\xff]/$trans[ord($&)-(128)]/ge ; return $string; } sub init() { @trans = ( "\304", "\305", "\307", "\311", "\321", "\326", "\334", "\341", # Mac \200 - \207 # Ä Å Ç É Ñ Ö Ü á "\340", "\342", "\344", "\343", "\345", "\347", "\351", "\350", # Mac \210 - \217 # à â ä ã å ç é è "\352", "\344", "\355", "\354", "\356", "\357", "\361", "\363", # Mac \220 - \227 # ê ë í ì î ï ñ ó "\362", "\364", "\366", "\365", "\372", "\371", "\373", "\374", # Mac \230 - \237 # ò ô ö õ ú ù û ü "*", "\260", "\242", "\243", "\247", "*", "\266", "\337", # MAC \240 - \247 # dagger ° ¢ £ § bullet ¶ ß "\256", "\251", "(TM)", "\264", "\250", "<>", "\306", "\330", # Mac \250 - \257 # ® © trademark ´ ¨ not_eq Æ Ø "infinity", "\261", "<=", ">=", "\245", "\265", "delta", "Sigma", # Mac \260 -267 # infinity ± less/eq great/eq ¥ µ delta Sigma "pi", "Pi", "integral", "\252", "\272", "Omega", "\346", "\370", # Mac \270 - \277 # pi Pi integral ª º Omega æ ø "\277", "\241", "\254", "sqrt", "f", "~=", "Delta", "\253", # Mac \300 - \307 # ¿ ¡ ¬ radical florin apeq Delta &laqot; "\273", "...", "\240", "\300", "\303", "\325", "OE", "oe", # MAC \310 - \317 # &raqot; ellipsis À Ã Õ OE oe "-", "--", '"', '"', '"', '"', "\367", "*", # Mac \320 - \327 # endash emdash open_qt clos_qt open_qt clos_qt ÷ diamond "\377", "Y", "/", "*", '"', '"', "fi", "fl", # Mac \330 - \337 # ÿ Y.umlaut fraction circ.x open_qt clos qt fi.lig fl.lig "*", "\267", "'", '"', "o/oo", "\305", "\312", "\301", # Mac \340 - 341 # dbldagger · under_qt under_dqt per_mil Â Ê Á "\313", "\310", "\315", "\316", "\317", "\314", "\323", "\324", # Mac \350 - \357 # Ë È Í Î Ï Ì Ó Ô "*", "\322", "\332", "\333", "\331", "i", "", "", # Mac \360 - \367 # apple Ò Ú Û Ù dotless_i circumflex tilde "\257", "", "", "", "", "", "", "" ); # Mac \370 - \377 # ¯ breve dot ring_above cedilia hung_umlaut ogonek caron } __END__ ---------------------------------------------------------------------- Axel Rose, Springer & Jacoby Digital GmbH & Co. KG, mailto:rose@sj.com pub PGP key 1024/A21CB825 E0E4 BC69 E001 96E9 2EFD 86CA 9CA1 AAC5 "... denn alles, was entsteht, ist wert, daß es zugrunde geht ..." # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org