Convert-YText

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    Convert::YText - Quotes strings suitably for rfc2822 local part

    Convert::YText converts strings to and from "YText", a format inspired
    by xtext defined in RFC1894, the MIME base64 and quoted-printable types
    (RFC 1394). The main goal is encode a UTF8 string into something safe
    for use as the local part in an internet email address (RFC2822).

    By default spaces are replaced with "+", "/" with "~", the
    characters "A-Za-z0-9_.-" encode as themselves, and everything
    else is written "=USTR=" where USTR is the base64 (using
    "A-Za-z0-9_." as digits) encoding of the unicode character
    code. The encoding is configurable; perldoc Convert::YText for
    more information.

AUTHOR
    David Bremner, <ddb@cpan.org>

REPOSITORY

    git://gitolite.debian.net/convert-ytext.git

lib/Convert/YText.pm  view on Meta::CPAN

=head1 DESCRIPTION

Convert::YText converts strings to and from "YText", a format inspired
by xtext defined in RFC1894, the MIME base64 and quoted-printable
types (RFC 1394).  The main goal is encode a UTF8 string into something safe
for use as the local part in an internet email address  (RFC2822).

By default spaces are replaced with "+", "/" with "~", the characters
"A-Za-z0-9_.-" encode as themselves, and everything else is written
"=USTR=" where USTR is the base64 (using "A-Za-z0-9_." as digits)
encoding of the unicode character code.  The encoding is configurable
(see below).

=head1 PROCEDURAL INTERFACE

The module can can export C<encode_ytext> which converts arbitrary
unicode string into a "safe" form, and C<decode_ytext> which recovers
the original text.  C<validate_ytext> is a heuristic which returns 0
for bad input.


=cut


sub encode_ytext{
  my $str=shift;
  my $object = Convert::YText->new();



( run in 1.193 second using v1.01-cache-2.11-cpan-88abd93f124 )