NAME

mb::Encode - provides MBCS encoder and decoder

SYNOPSIS

   use mb::Encode qw();

   # MBCS encode
   $big5_octet      = mb::Encode::to_big5     (UTF8_octet);
   $big5hkscs_octet = mb::Encode::to_big5hkscs(UTF8_octet);
   $cp932_octet     = mb::Encode::to_cp932    (UTF8_octet);
   $cp936_octet     = mb::Encode::to_cp936    (UTF8_octet);
   $cp949_octet     = mb::Encode::to_cp949    (UTF8_octet);
   $cp950_octet     = mb::Encode::to_cp950    (UTF8_octet);
   $eucjp_octet     = mb::Encode::to_eucjp    (UTF8_octet);
   $gbk_octet       = mb::Encode::to_gbk      (UTF8_octet);
   $sjis_octet      = mb::Encode::to_sjis     (UTF8_octet);
   $uhc_octet       = mb::Encode::to_uhc      (UTF8_octet);

   # MBCS decode
   $UTF8_octet = mb::Encode::by_big5     (big5_octet     );
   $UTF8_octet = mb::Encode::by_big5hkscs(big5hkscs_octet);
   $UTF8_octet = mb::Encode::by_cp932    (cp932_octet    );
   $UTF8_octet = mb::Encode::by_cp936    (cp936_octet    );
   $UTF8_octet = mb::Encode::by_cp949    (cp949_octet    );
   $UTF8_octet = mb::Encode::by_cp950    (cp950_octet    );
   $UTF8_octet = mb::Encode::by_eucjp    (eucjp_octet    );
   $UTF8_octet = mb::Encode::by_gbk      (gbk_octet      );
   $UTF8_octet = mb::Encode::by_sjis     (sjis_octet     );
   $UTF8_octet = mb::Encode::by_uhc      (uhc_octet      );

   # imports short name
   use mb::Encode qw(
       to_big5       big5       by_big5
       to_big5hkscs  big5hkscs  by_big5hkscs
       to_cp932      cp932      by_cp932
       to_cp936      cp936      by_cp936
       to_cp949      cp949      by_cp949
       to_cp950      cp950      by_cp950
       to_eucjp      eucjp      by_eucjp
       to_gbk        gbk        by_gbk
       to_sjis       sjis       by_sjis
       to_uhc        uhc        by_uhc
   );

   # MBCS encode on shorthand
   $big5_octet      = big5     (UTF8_octet);
   $big5hkscs_octet = big5hkscs(UTF8_octet);
   $cp932_octet     = cp932    (UTF8_octet);
   $cp936_octet     = cp936    (UTF8_octet);
   $cp949_octet     = cp949    (UTF8_octet);
   $cp950_octet     = cp950    (UTF8_octet);
   $eucjp_octet     = eucjp    (UTF8_octet);
   $gbk_octet       = gbk      (UTF8_octet);
   $sjis_octet      = sjis     (UTF8_octet);
   $uhc_octet       = uhc      (UTF8_octet);

SEE ALSO

Encode - character encodings in Perl
https://metacpan.org/dist/Encode

Jacode - Perl program for Japanese character code conversion
https://metacpan.org/dist/Jacode

Jacode4e - jacode.pl-like program for enterprise
https://metacpan.org/dist/Jacode4e

Jacode4e::RoundTrip - Jacode4e for round-trip conversion in JIS X 0213
https://metacpan.org/dist/Jacode4e-RoundTrip

mb - run Perl script in MBCS encoding (not only CJK ;-)
https://metacpan.org/dist/mb

UTF8::R2 - makes UTF-8 scripting easy for enterprise use or LTS
https://metacpan.org/dist/UTF8-R2

IOas::CP932IBM - provides CP932IBM I/O subroutines for UTF-8 script
https://metacpan.org/dist/IOas-CP932IBM

IOas::CP932NEC - provides CP932NEC I/O subroutines for UTF-8 script
https://metacpan.org/dist/IOas-CP932NEC

IOas::CP932 - provides CP932 I/O subroutines for UTF-8 script
https://metacpan.org/dist/IOas-CP932

IOas::SJIS2004 - provides SJIS2004 I/O subroutines for UTF-8 script
https://metacpan.org/dist/IOas-SJIS2004

IOas::CP932X - provides CP932X I/O subroutines for UTF-8 script
https://metacpan.org/dist/IOas-CP932X

AUTHOR

INABA Hitoshi <ina@cpan.org>

This project was originated by INABA Hitoshi.

LICENSE AND COPYRIGHT

This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.