NAME

    Jacode4e - Converts Character Encodings for Enterprise in Japan

SYNOPSIS

  use FindBin;
  use lib "$FindBin::Bin/lib";
  use Jacode4e;
 
  $char_count =
  Jacode4e::convert(\$line, $OUTPUT_encoding, $INPUT_encoding [, { %option }]);
 
    $char_count
      Count of characters in $line

    $line
    $OUTPUT_encoding
    $INPUT_encoding
      Converts encoding of $line from $INPUT_encoding to $OUTPUT_encoding then
      overwrites $line.
      $OUTPUT_encoding and $INPUT_encoding cannot omit.
      You can use mnemonic as encoding name of $INPUT_encoding and $OUTPUT_encoding:

      mnemonic      means
      -----------------------------------------------------------------------
      cp932x        CP932X, Extended CP932 to JIS X 0213 using 0x9C5A as single shift
      cp932         Microsoft CP932, IANA Windows-31J
      cp932ibm      IBM CP932
      cp932nec      NEC CP932
      sjis2004      JISC Shift_JIS-2004
      cp00930       IBM CP00930(CP00290+CP00300), CCSID 5026 katakana
      keis78        HITACHI KEIS78
      keis83        HITACHI KEIS83
      keis90        HITACHI KEIS90
      jef           FUJITSU JEF (12 point size for printing with option OUTPUT_SHIFTING)
      jef9p         FUJITSU JEF ( 9 point size for printing with option OUTPUT_SHIFTING)
      jipsj         NEC JIPS(J)
      jipse         NEC JIPS(E)
      letsj         UNISYS LetsJ
      utf8          UTF-8.0 (aka UTF-8)
      utf8.1        UTF-8.1
      utf8jp        UTF-8-SPUA-JP, JIS X 0213 on SPUA ordered by JIS level, plane, row, cell
      -----------------------------------------------------------------------

    { %option }
      Hash reference "{ %option }" can omit.
      You can following mnemonics as keys of hash reference "{ %option }":

      key mnemonic      value means
      -----------------------------------------------------------------------
      INPUT_LAYOUT      input record layout by 'S' and 'D' sequence
                        'S' means one char as SBCS, 'D' means one char as DBCS
                        each letter may optionally be followed by a number
                        indicating the repeat count, see samples
      OUTPUT_SHIFTING   true means use output shift code, false means not use
                        default is false
      SPACE             output space code in DBCS/MBCS
      GETA              output geta code in DBCS/MBCS
      OVERRIDE_MAPPING  hash reference of FROM => TO override mapping
                        { "\x12\x34"=>"\x56\x78", "\x9A\xBC"=>"\xDE\xFE", }
                        (CAUTION! override also SPACE option)
      -----------------------------------------------------------------------

    If you need round-trip conversion, you had better use Jacode4e::RoundTrip
    module.

DEPENDENCIES

    perl version 5.005_03 to newest perl