MIME::Charset~[ja](3) MIME XXXXXXXXXXXXXX

SYNOPSIS


use MIME::Charset:
$charset = MIME::Charset->new("euc-jp");

XXXXXXXXXXXXX:

    $benc = $charset->body_encoding; # X "Q"
    $cset = $charset->as_string; # X "US-ASCII"
    $henc = $charset->header_encoding; # X "S"
    $cset = $charset->output_charset; # X "ISO-2022-JP"

XXXXXXXXXX:

    ($text, $charset, $encoding) =
        $charset->header_encode(
           "\xc9\xc2\xc5\xaa\xc0\xde\xc3\xef\xc5\xaa".
           "\xc7\xd1\xca\xaa\xbd\xd0\xce\xcf\xb4\xef",
           Charset => 'euc-jp');
    # ...XXX (<XXXXXXX>, "ISO-2022-JP", "B") XXXX
    ($text, $charset, $encoding) =
        $charset->body_encode(
            "Collectioneur path\xe9tiquement ",
            Charset => 'latin1');
    # ...XXX (<XXXXX>, "ISO-8859-1", "QUOTED-PRINTABLE") XXXX
    $len = $charset->encoded_header_len(
        "Perl\xe8\xa8\x80\xe8\xaa\x9e",
        Charset => "utf-8",
        Encoding => "b");
    # ...XXX 28 XXXX

XXXXXXXXXXX:

    MIME::Charset::alias("csEUCKR", "euc-kr");
    MIME::Charset::default("iso-8859-1");
    MIME::Charset::fallback("us-ascii");

XOOXX (XXXXXXX):

    use MIME::Charset qw(:info);
    $benc = body_encoding("iso-8859-2"); # "Q"
    $cset = canonical_charset("ANSI X3.4-1968"); # "US-ASCII"
    $henc = header_encoding("utf-8"); # "S"
    $cset = output_charset("shift_jis"); # "ISO-2022-JP"
    use MIME::Charset qw(:trans);
    ($text, $charset, $encoding) =
        header_encode(
           "\xc9\xc2\xc5\xaa\xc0\xde\xc3\xef\xc5\xaa".
           "\xc7\xd1\xca\xaa\xbd\xd0\xce\xcf\xb4\xef",
           "euc-jp");
    # ...(<XXXXXXXXX>, "ISO-2022-JP", "B") XXXX
    ($text, $charset, $encoding) =
        body_encode(
            "Collectioneur path\xe9tiquement ".
            "\xe9clectique de d\xe9chets",
            "latin1");
    # ...(<XXXXXX>, "ISO-8859-1", "QUOTED-PRINTABLE") XXXX
    $len = encoded_header_len(
        "Perl\xe8\xa8\x80\xe8\xaa\x9e", "b", "utf-8"); # 28

DESCRIPTION

MIME::Charset XXXXXXXXXXXX MIME XXXXXXXXXXXXXXXXXXXXXXXXXX

XX

XXXXXXXX XXXMIME XX ``character set'' XXXXX XXXXXXXXXXXXXXXXXXXXXXX XXXXISO/IEC XXXX ``XXXXXXX'' (CCS) X ``XXXXXX'' (CES) XXXXXXXXXXXX

XXXXXXXX XXXMIME XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX US-ASCII XXXXXXXXXXXXXXXXX

XXXXXXX

$charset = MIME::Charset->new([CHARSET [, OPTS]])
XXXXXXXXXXXXXXXXXXXXXX

OPTS XXXXXXXXXXXX NOTE: Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXXXXXXXXXXXXXXXXXXXXX

Mapping => MAPTYPE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "EXTENDED" XXXXXXXXXXXX "STANDARD" XXXXXXXXXXXXXXXXXXXXX XXX "EXTENDED"X

XXXXXXXXXXXXX

$charset->body_encoding
body_encoding CHARSET
CHARSET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXX "B" (BASE64)X"Q" (QUOTED-PRINTABLE)X"S" (XXXXXXXX)X "undef" (XXXXXXXXXXXXX --- 7BIT X 8BIT) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

$charset->as_string
canonical_charset CHARSET
XXXXXXXXXXXXXXXXXXXX
$charset->decoder
XXXXXXXXX Unicode XXXXXXXXX ``Encode::Encoding'' XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXundef XXXXX
$charset->dup
XXXXXXXXXXXXXXXXXXXX
$charset->encoder([CHARSET])
XXXXXXXXX MIME XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``Encode::Encoding'' XXXXXXXXXX

CHARSET XXXXXXXXXX$charset XXXXXXXXXXX (XXXXXXXXXXXXXX) XXCHARSET XXXXXXXXXX XXXX$charset XXXXXXXXXXXXXXXXXXXXXX CHARSET XXXXXXXXX

$charset->header_encoding
header_encoding CHARSET
CHARSET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXX "B"X"Q"X"S" (XXXXXXXXXX)X "undef" (XXXXXXXXXXX) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

$charset->output_charset
output_charset CHARSET
XXXX CHARSET XXXXXXXXXXXXXX MIME XXXXXXXXXXXXXXXXXXXXXXXXXX (XXXXXXXXXXXXX) XXXXX

Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXX ``canonical_charset'' XXXXXXX

XXXXXXXXXX

$charset->body_encode(STRING [, OPTS])
body_encode STRING, CHARSET [, OPTS]
STRING X (XXXX) XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX CHARSET X STRING XXXXXXXXXXXXXXXXX

OPTS XXXXXXXXXXXXX NOTE: Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXXXXXXXXXXXXXXXXXXXXXX

Detect7bit => YESNO
CHARSET XXXXXX7XXXXXXXXXXXXXXXXXXXXXXXX XXX "YES"X
Replacement => REPLACEMENT
XXXXXXXXXX``XXXXX'' XXX

3XXXXXX (XXXXXXXX, XXXXXXXXXXX, XXXXXXXXXX) XXXX XXXXXXXXXX X "BASE64"X"QUOTED-PRINTABLE"X "7BIT"X"8BIT" XXXXXXXXXXXXXXXXX XXXXXXX XXXXXXXX X ASCIIXXXXXXXXXXXXX XXXXXXXXXXX X "undef"XXXXXXXXXXX X "BASE64" XXXX XXXXXXXXXXX X "US-ASCII" XXXXXXXXXX ASCIIXXXXXXXXXXXXXXXXX

$charset->decode(STRING [,CHECK])
STRING X Unicode XXXXXXXXX

NOTE: Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXXXXXXXX

detect_7bit_charset STRING
XXX STRING XXXXXXXX7 XXXXXXXXXXXXXXXXX STRING X8XXXXXXXXXXXXX "undef" XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$charset->encode(STRING [, CHECK])
STRING (Unicode XXXXXXXXXXXX) XX XXXXXXXXXXXXXXXXXXXXXXX MIME XXXXXXXXXXXXXXXXXXXXXXXXX (XXXXXXXXXXXXX) XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXX Unicode XXXXXXXXXXXXXXXXXX

NOTE: Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXXXXXXXX

$charset->encoded_header_len(STRING [, ENCODING])
encoded_header_len STRING, ENCODING, CHARSET
STRING XXXXXXXXXXXXXXXXXXXXXXXX (XXXXXXXXXX) XXXXXX

ENCODING X "B"X"Q"X"S" ("B" X "Q" XXXXXXXXX) XXXXXX

$charset->header_encode(STRING [, OPTS])
header_encode STRING, CHARSET [, OPTS]
STRING X (XXXX) XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX CHARSET X STRING XXXXXXXXXXXXXXXXX

OPTS XXXXXXXXXXXXX NOTE: Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXXXXXXXXXXXXXXXXXXXXXX

Detect7bit => YESNO
CHARSET XXXXXX7XXXXXXXXXXXXXXXXXXXXXXXX XXX "YES"X
Replacement => REPLACEMENT
XXXXXXXXXX``XXXXX'' XXX

3XXXXXX (XXXXXXXX, XXXXXXXXXXX, XXXXXXXXX) XXXX XXXXXXXXX X "B"X"Q"X"undef" (XXXXXXXXXXX) XXXXXX XXXXXXXXXXX XXXXXXXXXXXXXXX X ASCIIXXXXXXXXXXXXXXXXXXXXXXXX X "8BIT" (XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX) X XXXXXXXXX X "undef" (XXXXXXXXXXXXX) XXXX XXXXXXXXXXX X "US-ASCII" XXXXXXXXXX ASCIIXXXXXXXXXXXXXXXXX

$charset->undecode(STRING [,CHECK])
Unicode XXX string XX $charset XXXXXXXXXXXXXXXXXXXXXXXX XXX "$charset->decoder->encode()" XXXXXXX

NOTE: Unicode/XXXXXXXXXXXXXXXXXXXX (``USE_ENCODE'' XX) XX XXXXXXXXXXXXX

XXXXXXXXXXX

alias ALIAS [, CHARSET]
``canonical_charset'' XXXXXXXXXXXXXXXXXXXXXXXXXX/XXXXX

CHARSET XXXXXXXXXXXALIAS X CHARSET XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX XX ALIAS XXXXXXXXXXXXXXXXXXXX

default [CHARSET]
XXXXXXXXXXXXX/XXXXX

XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXX "US-ASCII"X

CHARSET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX

NOTE: XXXXXXXXXXXXXXXXXXXXXX

fallback [CHARSET]
XXXXXXXXXXXXX/XXXXX

XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX "FALLBACK" XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX "UTF-8"X

CHARSET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CHARSET X "NONE" XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX

NOTE: XXXXXXXXXXX "US-ASCII" XXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

recommended CHARSET [, HEADERENC, BODYENC [, ENCCHARSET]]
XXXXXXXXXXXXXX/XXXXX

XXXXXXXXXXXXXXXXXXXXXXXX XXXXX CHARSET XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXCHARSET XXXXXXX 3 XXXXXX (HEADERENC, BODYENC, ENCCHARSET) XXXXXX

HEADERENC XXXXXXXXXXXXXXXXXXXXXXXXX "B"X"Q"X"S" (XXXXXXXXXX)X "undef" (XXXXXXXXXXX) XXXXXXX

BODYENC XXXXXXXXXXXXXXXXXXXXXXXXX "B"X"Q"X"S" (XXXXXXXXXX)X"undef" (XXXXXXXXXXXXX) XXXXXXX

ENCCHARSET XXXXXX CHARSET XXXXXXXXXXXXXX MIME XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX (XXXXXXXXXXXXXXXXXXXXXXXXXX) XXXX ENCCHARSET X "undef"X

NOTE: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (XXXXXXXXXXXXXXXXXXXXXXXX)X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``header_encoding''X``body_encoding''X``output_charset'' XXXXXXXX

XX

USE_ENCODE
Unicode/XXXXXXXXXXXX Unicode XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX Perl 5.7.3 XXXXXXXXXXXXXXX Perl XXXXXXXX

XXXXX

``body_encode'' X ``header_encode'' X "Replacement" XXXXXXXXXXXXXXXXXX:
"DEFAULT"
XXXXXXXXXXXXXXXXXXX UCM XXXXXXXXXXXXXXXXXXXXX <subchar> XXXXXXXXX
"FALLBACK"
XXXXXXXXXX XXXX "DEFAULT" XXXXXXXX (``fallback'' XX)X XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX
"CROAK"
XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX eval{} XXXXXXXXXXXXXXXXXXXXX "STRICT" XXXXX
"PERLQQ"
"HTMLCREF"
"XMLCREF"
Encode XXXXXXXXXXXX "FB_PERLQQ"X"FB_HTMLCREF"X"FB_XMLCREF" XXXXXXX
XX
XXXXXXXXXXXXXX XXX ``Handling Malformed Data'' in Encode XXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "DEFAULT" XXXXX

XXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXX MIME/Charset/Defaults.pm XXXXXXXXXXXX XXXX MIME/Charset/Defaults.pm.sample XXXXXXXX

VERSION

$VERSION XXXXXXXXX

XXXXXXXXXXXX <http://hatuka.nezumi.nu/repos/MIME-Charset/> XXXX

XXXXXX

1.001
  • new() XXXXX CHARSET XXXXXXXXXXXXXXXXXXXXXXXXXX
1.005
  • encoded-word XXXXXXXXX RFC 2047 X 5 \fIs0(3) XXXXXXXXX encoded_header_len() XXXXXXXXXXXX
1.008.2
  • body_encoding() XXXXX "S" XXXXXXXXXXX
  • body_encode() XXXXX UTF-8 XXXXXXXXXXXXXXXXXXX XXXXXXXXXXX "BASE64" XXXXXXXX"QUOTED-PRINTABLE" XXXXXXXXX

AUTHOR

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>

COPYRIGHT

Copyright (C) 2006-2013 Hatuka*nezumi - IKEDA Soji. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.