NAME
    Mail::Message::String - base class of string used in message (header).

SYNOPSIS
        use Mail::Message::String $subject;
        my $sbj = new Mail::Message::String $subject;
        $sbj->mime_header_decode();

         ... delte tag et.al. ...

        $sbj->mime_header_encode();
        $subject = $sbj->as_str();

DESCRIPTION
METHODS
  new()
    constructor.

  set($str)
    initialize data in this object.

  get()
    get (converted) data in this object as string (same as as_str()).

  as_str()
    return data (converted data) as string.

  as_external_form()
    return the internal data as the external form string.

MIME related utilities
  set_mime_charset($charset)
    dummy now.

  get_mime_charset()
    return charset information.

  mime_header_encode()
    encode the given Perl internal UTF8 format to the MIME Header string and
    return the encoded message.

  mime_header_decode()
    decode MIME Header string and return the decoded message as Perl
    internal UTF8 format.

CHAR CODE CONVERSION UTILITIES
    We need to identify internal and external char codes in fml8. It is
    defined in "Mail::Message::Charset".

    For example, if the original data is "=?iso-2022-jp?....", external code
    is "iso-2022-jp" but internal code is "euc-jp".

  charcode_convert($out_code, [$in_code])
    convert charactor code to $out_code and return it.

    if $in_code is given, it is used as a hint. if $in_code is not given,
    speculate the code.

    if $out_code is not given, try to resolve the out code based on the
    initial data (e.g. =?ISO-2022-JP? part).

  charcode_convert_to_internal_code().
    convert (internal) string to code internally used in fml8. same as
    charcode_convert() in fact.

  charcode_convert_to_external_charset()
    convert (internal) string to code externally used in fml8. It implies
    original code almot cases.

    We should ignore the original mime chaset in some cases. For example,
    consider invalid "=?sjis? ..." mime string is given. How should we do?

    In fact, this module return the mime encoded string as iso-2022-jp
    (valid) not original sjis (invalid) charset.

  get_charcode($str)
    regturn char code of $str.

UTILITIES
  unfold()
    unfold in-core data.

  is_citation()
    $data looks a citation or not.

  is_signature()
    $data looks a citation or not.

CODING STYLE
    See "http://www.fml.org/software/FNF/" on fml coding style guide.

AUTHOR
    Ken'ichi Fukamachi

COPYRIGHT
    Copyright (C) 2004,2005 Ken'ichi Fukamachi

    All rights reserved. This program is free software; you can redistribute
    it and/or modify it under the same terms as Perl itself.

HISTORY
    Mail::Message::String appeared in fml8 mailing list driver package. See
    "http://www.fml.org/" for more details.

