The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Jacode - Perl program for Japanese character code conversion

SYNOPSIS

    use FindBin;
    use lib "$FindBin::Bin/lib";
    use Jacode;

    Jacode::convert(\$line, $OUTPUT_encoding [, $INPUT_encoding [, $option]])
    Jacode::xxx2yyy(\$line [, $option])
    Jacode::to($OUTPUT_encoding, $line [, $INPUT_encoding [, $option]])
    Jacode::jis($line [, $INPUT_encoding [, $option]])
    Jacode::euc($line [, $INPUT_encoding [, $option]])
    Jacode::sjis($line [, $INPUT_encoding [, $option]])
    Jacode::utf8($line [, $INPUT_encoding [, $option]])
    Jacode::jis_inout($JIS_Kanji_IN, $ASCII_IN)
    Jacode::get_inout($line)
    Jacode::cache()
    Jacode::nocache()
    Jacode::flushcache()
    Jacode::flush()
    Jacode::h2z_xxx(\$line)
    Jacode::z2h_xxx(\$line)
    Jacode::tr(\$line, $from, $to [, $option])
    Jacode::trans($line, $from, $to [, $option])
    Jacode::init()

SAMPLES

Convert SJIS to JIS and print each line with code name

  use FindBin;
  use lib "$FindBin::Bin/lib";
  #require 'jcode.pl';
  use Jacode;
  while (defined($s = <>)) {
      #$code = &jcode'convert(\$s, 'jis', 'sjis');
      $code = Jacode::convert(\$s, 'jis', 'sjis');
      print $code, "\t", $s;
  }

Convert SJIS to UTF-8 and print each line by perl 5.00503 or later

  use FindBin;
  use lib "$FindBin::Bin/lib";
  #retire 'jcode.pl';
  no Jcode;
  use Jacode;
  while (defined($s = <>)) {
      Jacode::convert(\$s, 'utf8', 'sjis');
      print $s;
  }

Convert SJIS to UTF16-BE and print each line by perl 5.8.1 or later

  use FindBin;
  use lib "$FindBin::Bin/lib";
  use Jacode;
  use 5.8.1;
  while (defined($s = <>)) {
      Jacode::convert(\$s, 'UTF16-BE', 'sjis');
      print $s;
  }

Convert SJIS to MIME-Header-ISO_2022_JP and print each line by perl 5.8.1 or later

  use FindBin;
  use lib "$FindBin::Bin/lib";
  use Jacode;
  use 5.8.1;
  while (defined($s = <>)) {
      Jacode::convert(\$s, 'MIME-Header-ISO_2022_JP', 'sjis');
      print $s;
  }

LICENSE AND COPYRIGHT

This software is free software;

Copyright (c) 2018 INABA Hitoshi <ina@cpan.org>> in a CPAN

The latest version is available here:

http://search.cpan.org/dist/jacode4e/

Use and redistribution for ANY PURPOSE are granted as long as all copyright notices are retained. Redistribution with modification is allowed provided that you make your modified version obviously distinguishable from the original one. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED.

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.