Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Email::MIME::RFC2047::UserdContributed Perl DoEmail::MIME::RFC2047::Decoder(3)

NAME
       Email::MIME::RFC2047::Decoder - Decoding	of non-ASCII MIME headers

VERSION
       version 0.97

SYNOPSIS
	   use Email::MIME::RFC2047::Decoder;

	   my $decoder = Email::MIME::RFC2047::Decoder->new();

	   my $string =	$decoder->decode_text($encoded_text);
	   my $string =	$decoder->decode_phrase($encoded_phrase);

DESCRIPTION
       This module decodes parts of MIME email message headers containing non-
       ASCII text according to RFC 2047.

CONSTRUCTOR
   new
	   my $decoder = Email::MIME::RFC2047::Decoder->new();

       Creates a new decoder object.

METHODS
   decode_text
	   my $string =	$decoder->decode_text($encoded_text);

       Decodes any MIME	header field for which the field body is defined as
       "unstructured" (RFC 2822) or *text (RFC 822), for example, any Subject
       or Comments header field.

       $encoded_text can also be a reference to	a scalar. In this case,	the
       scalar is processed starting from the current search position. See
       "pos" in	perlfunc.

       The resulting string is trimmed and any whitespace is collapsed.	This
       means that lines	separated by folding whitespace	are unfolded. Folding
       whitespace is not checked for syntactical correctness. Newlines are
       treated like normal whitespace.

   decode_phrase
	   my $string =	$decoder->decode_phrase($encoded_phrase);

       Decodes any "phrase" token (as defined by RFC 2822) in a	MIME header
       field, for example, one that precedes an	address	in a From, To, or Cc
       header.

       This method works like decode_text but additionally unquotes any
       "quoted-string"s. It also stops at any special character	as defined by
       RFC 2822, excluding the period character	"." and	the double quote '"'.
       If $encoded_phrase is a reference to a scalar, the current search
       position	is set accordingly. This is helpful when parsing RFC 2822
       address headers.

AUTHOR
       Nick Wellnhofer <wellnhofer@aevum.de>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2017 by Nick Wellnhofer.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.32.0			  2017-07-31  Email::MIME::RFC2047::Decoder(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | CONSTRUCTOR | METHODS | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Email::MIME::RFC2047::Decoder&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help