MIME::Words

MIME::Words is a Perl module to deal with RFC-1522 encoded words.
Download

MIME::Words Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Eryq
  • Publisher web site:
  • http://search.cpan.org/~eryq/MIME-tools-6.200_02/lib/MIME/Tools/changes.pod

MIME::Words Tags


MIME::Words Description

MIME::Words is a Perl module to deal with RFC-1522 encoded words. MIME::Words is a Perl module to deal with RFC-1522 encoded words.SYNOPSISBefore reading further, you should see MIME::Tools to make sure that you understand where this module fits into the grand scheme of things. Go on, do it now. I'll wait.Ready? Ok... use MIME::Words qw(:all); ### Decode the string into another string, forgetting the charsets: $decoded = decode_mimewords( 'To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= ', ); ### Split string into array of decoded pairs: @decoded = decode_mimewords( 'To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= ', ); ### Encode a single unsafe word: $encoded = encode_mimeword("xABFranxE7oisxBB"); ### Encode a string, trying to find the unsafe words inside it: $encoded = encode_mimewords("Me and xABFranxE7oisxBB in town");Fellow Americans, you probably won't know what the hell this module is for. Europeans, Russians, et al, you probably do.For example, here's a valid MIME header you might get: From: =?US-ASCII?Q?Keith_Moore?= < moore@cs.utk.edu> To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= < keld@dkuug.dk> CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard < PIRARD@vm1.ulg.ac.be> Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= =?US-ASCII?Q?.._cool!?=The fields basically decode to (sorry, I can only approximate the Latin characters with 7 bit sequences /o and 'e): From: Keith Moore < moore@cs.utk.edu> To: Keld J/orn Simonsen < keld@dkuug.dk> CC: Andr'e Pirard < PIRARD@vm1.ulg.ac.be> Subject: If you can read this you understand the example... cool! Requirements: · Perl


MIME::Words Related Software