NAME Mail::Message::Encode - encode/decode/charset conversion routines. SYNOPSIS use Mail::Message::Encode; my $code = Mail::Message::Encode->detect_code($str); It is not recommended but if you use old style, import required function: use Mail::Message::Encode qw(STR2EUC); my $euc_string = STR2EUC($string); DESCRIPTION METHODS new() constructor. detect_code($str) speculate the code of $str string. $str is checked by Unicode::Japanese. Unicode::Japanes::getcode() can detect the follogin code: jis, sjis, euc, utf8, ucs2, ucs4, utf16, utf16-ge, utf16-le, utf32, utf32-ge, utf32-le, ascii, binary, sjis-imode, sjis-doti, sjis-jsky. "CAUTION": we handle only Japanese and English. convert($str, $out_code, $in_code) convert $str to $out_code code. $in_code is used as a hint. convert_str_ref($str_ref, $out_code, $in_code) convert string reference $str_str to $out_code code. $in_code is used as a hint. run_in_code($proc, $s, $args, $out_code, $in_code) run $proc($s) under $out_code environment. So, execute $proc like this. my $obj = new Mail::Message::Encode; my $conv_status = $obj->convert_str_ref($s, $out_code, $in_code); &$proc($s, $args); It means run $proc() after $s is converted to $out_code code. UTILITIES is_iso2022jp_string($buf) $buf looks like Japanese or not ? BACKWARD COMPATIBILITY STR2EUC($str) convert $str to japanese EUC code. STR2JIS($str) convert $str to japanese JIS code. STR2SJIS($str) convert $str to japanese SJIS code. MIME ENCODE/DECODE CODING STYLE See "http://www.fml.org/software/FNF/" on fml coding style guide. AUTHOR Ken'ichi Fukamachi COPYRIGHT Copyright (C) 2002,2003,2004,2005,2011 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::Encode first appeared in fml8 mailing list driver package. See "http://www.fml.org/" for more details.