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_decode();                          # euc-jp
        $sbj->unfold();
         ... delte tag et.al. ...
        $sbj->unfold();
        $sbj->charcode_convert_to_external_charset(); # e.g. iso-2022-jp
        $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.

MIME related utilities
  mime_encode($encode, $out_code, $in_code)
    mime encode this object and return the encoded string.

  mime_decode($out_code, $in_code)
    mime decode this object and return the decoded string.

  set_mime_charset($charset)
    dummy now.

  get_mime_charset()
    return charset information.

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.

