Jcode::Nihongo(3)

XX
Jcode - XXXXXXXXXXX

XX
 use Jcode;
 #
 # XXXXXX
 Jcode::convert($str, $ocode, $icode, "z");
 # XXXXXXXXXXXXXX
 print Jcode->new($str)->h2z->tr($from, $to)->utf8;

XX
Jcode.pmXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  $iso_2022_jp = Jcode->new($str)->h2z->jis;

XXXXXXXXXXXXXXX

  $iso_2022_jp = $str;
  &jcode::convert(\$iso_2022_jp, 'jis', &jcode::getcode(\$str), "z");

XXXXXXXXXXXXXXXXXXXJcode.pmXXX"getcode()"X "convert()"XXXXXXXXXXX

PerlXXXXXXX5.8.1XXXXXJcodeXXPerl 5.8XXXXXXXXXXX XXXXXXXXXXXXEncodeXXXXXXXXXXXXXXX

XXXX
XXXXXXXXXXXXXXXXXXXXXXXJcodeXXXXXXXXXXXX

  XXXXXXX

$j = Jcode->new($str [, $icode])
    $strXXJcodeXXXXXX$jXXXXXXXXXXX$icodeXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX getcodeXXXXXXXXXX

    Perl 5.8.1XXXXX$icodeXXEncodeXXXXXX XXXXXXXXXXXXXXXXXX

      $j = Jcode->new($european, 'iso-latin1');

    XXXXXXXXXXXXXXXEUCXXXXXXXXXXXXXXXXXXX "print $j->euc"XXXXXXXX"print $j"XXXXXX

    XXXXXXXX
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

         Jcode->new(\$str);

        XXXXXXXXXXXXXXXXXXXXXXXXX$strXXXXXXX XXXXXXXXXXXX$strXjcodeXXXXXXX"tieXXX"XXXXX

$j->set($str [, $icode])
    $jXXXXXXX$strXXXXXXXXXXXXJcodeXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

     # mailboxXSJISXXXXX
     my $jconv = new Jcode;
     $/ = 00;
     while(<>){
         print $jconv->set(\$_)->mime_decode->sjis;
     }

$j->append($str [, $icode]);
    $jXXXXXXX$strXXXXXX

$j = jcode($str [, $icode]);
    Jcode->new() XXXXXXXXXXXXXXXX

     $sjis = jcode($str)->sjis;

  XXXXXXXXX
XXXX$j->encodedXXXXXXencodedXXXXXXXXXXXXXX

$sjis = $j->sjis
$euc = $j->euc
$jis = $j->jis
$sjis = $j->sjis
$ucs2 = $j->ucs2
$utf8 = $j->utf8
    XXXXXXX WYCIWYG = What you code is what you get :)

$iso_2022_jp = $j->iso_2022_jp
    "$j->h2z->jis"XXXXXX XXXXXXXXXXXXXXXXXXX

    Perl 5.8.1XXXXXEncodeXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX

      $european = $j->iso_latin1; # XXXXXXX'-'X'_'XXXXXXX

    XXXEncode::EncoderXXXXXXXXXXXXXXXX

    $j->fallback($fallback)
        Perl 5.8.1XXXXXJcodeXXXXXXXXUTF-8XXXXXXX ->encodingXXXXXXXXXXX'?'XXXXXXXXXXX XXXEncodeXXXXXXXXX

          my $unistr = "\x{262f}"; # XXXXX
          my $j = jcode($unistr);  # $j->euc XXXX '?' X

        XXXXXXXXEncodeXXXXXXXXXXXXXXXXXXXXXXXXX XXEncodeXXXXXXXXXXXXXXX"Jcode::FB_PERLQQ"X "Jcode::FB_XMLCREF"X"Jcode::FB_HTMLCREF"XEncodeXXXXXX XXXXXXXXXXXXX

          print $j->fallback(Jcode::FB_PERLQQ)->euc;   # '\x{262f}'
          print $j->fallback(Jcode::FB_XMLCREF)->euc;  # '&#x262f;'
          print $j->fallback(Jcode::FB_HTMLCREF)->euc; # '&#9775;'

        XXXXXXX$Jcode::FALLBACKXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

          $Jcode::FALLBACK = Jcode::FB_PERLQQ; # XXXXXXXXXXXXXXXXXXXX

[@lines =] $jcode->jfold([$width, $newline_str, $kref])
    $widthXXXXXXX72XXXjcodeXXXXXXXXXXXXXX $widthXXXXXXXXXXXXXXXXX2XXXXXXXXXXXXX

    $newline_strXXXXXXX"\n"XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX

    Perl 5.8.1XXX3XXXXX$krefXEUCXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

$length = $jcode->jlength();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  MIME::Base64XXXXXXX
XXXXXXXXXXXXXMIME::Base64XXXXXXXXXXXXXXXX

   perl -MCPAN -e 'CPAN::Shell->install("MIME::Base64")'

XXXXXXXXXPerlX5.6XXXXXXXXMIME::Base64X XXXXXXXXXXXXXXXXXXXXXXXXXXXX

$mime_header = $j->mime_encode([$lf, $bpl])
    $strXRFC1522XXXMIME-HeaderXXXXXXX$lfXXXXXXX XXXXXXX$lfXXXXXXXXXXXXX\nXX $bplXXXXXXXXXXXXXXXX$bplXXXXXXXXXXXXX76X XXXXX76XXXXXXXXXXXXXX

    Perl 5.8.1XXXXXXXXXXXXXXMIME HeaderXXXXXXXXXXX

      $mime_header = $j->MIME_Header;

    XXXX$mime_headerXXXXXMIME-B-encoded UTF-8XXXXXX XXX"$j->mime_encode()"XMIME-B-encoded ISO-2022-JPXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX

$j->mime_decode;
    JcodeXXXXXXXXXXXXXMIME-HeaderXXXXXXXXPerl 5.8.1 XXXXXXXXXXXXXXXXXXXXXXX

      Jcode->new($str, 'MIME-Header');

    XXXXXXXISO-2022-JPXXXXXXUTF-8XXXXXXXXXXX XXXMIME B EncodingXXXXXMIME Q EncodingXXXXXXXX XXXPerl 5.8.1XXXXXXXXXXXXXXXXXXX

  XX XX XX

$j->h2z([$keep_dakuten])
    X201XXXXXXXX208XXXXXXXXXXXXX $keep_dakutenXXXXXXXXXXXXXXXXXXXXXX (XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX)

    $j->nmatchXXXXXXXXXXXXXXXXXX

$j->z2h
    X208XXXXXXXX201XXXXXXXXXXXXX

    $j->nmatchXXXXXXXXXXXXXXXXXX

  XXXXXXXXXX
"->m()"X"->s()"XXXXXXPerl 5.8.1XXX XXXXX

$j->tr($from, $to, $opt);
    JcodeXXXXXXX"tr/$from/$to/"XXXXXXX$fromX$toX EUC-JPXXXXXXXPerl 5.8.1XXXXXflagXXXUTF-8XXX XXXXXXXX

    $optXXXXXXXX"tr/$from/$to/$opt"XXXXXXXX$optX 'c'X'd'XXXXXXXXXXXXXXXXXXXXXXXX

    $j->nmatchXXXXXXXXXXXXXXXXXX

    Perl 5.8.1XXXXXtrXXXXXXXXXXXXX->error_trXXXXX $@XXXXXXXX

    XXXXXXXXPerl 5.8.1XXXXXXXXXXXX

$j->s($patter, $replace, $opt);
    XXX"s/$pattern/$replace/$opt"XXXXXXX$optXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXperlreXXXXXXXX

    "$j->tr()"X"$j->s()"XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX

      $j->tr("A-Z", "a-z")->s("foo", "bar");

[@match = ] $j->m($pattern, $opt);
    "m/$patter/$opt"XXXXXXXXXXXXXXXXXXXXXXXXXXX XXX"$j->s()"XXXXXXXXXXXXXXXXXXXXXXXXXXX

    XXXXXXXXXXXXXXXXX->error_mX->error_sXXXX $@XXXXXXXX

  XXXXXXXX
XXJcodeXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXOOP XXXX

XXXXXXJcodeXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXX XXXXXXXXXOOPXXXXXX

Perl 5.8.1XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXJcodeXXXXXXXXXXXXXXXXX

$j->r_str
    EUCXXXXXXXXXXXX

    Perl 5.8.1XXXXUTF-8XXXXXXXUTF-8XXXXXXXXXXXXXX

$j->icode
    XXXXXXXXXXXXXXXXX

$j->nmatch
    XXXXXXX$j->trXXXXXXXXX

XXXXXX

($code, [$nmatch]) = getcode($str)
    $strXXXXXXXXXXXXXXXXXXXXXXXXXX

     ascii   Ascii XXXXXXXXXXXXX
     binary  Binary XXXXXXXXXXXXXX
     euc     EUC-JP
     sjis    SHIFT_JIS
     jis     JIS (ISO-2022-JP)
     ucs2    UCS2 (Raw Unicode)
     utf8    UTF8

    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXX$strX\$str XXXXXXXX

    jcode.pl XXXXXXX XXXXXjcode::getcode()X100%XXXXX XXXXXXXXXXXX100%X

     * XXXXXXXXXXXXXXXXXXXXXX
       jcode::getcode()X$nmatchXXXXXXXXX

     * jcode::getcode()XXEUCXXXSJISXXXXXXXXXXX'undef'X
       XXXXX Jcode::getcode()XEUCXXXXXXXXXJcode.pmXX
       XXXXXXXXXX

Jcode::convert($str, [$ocode, $icode, $opt])
    $strX$ocodeXXXXXXXXXXXXXXXXX$icodeXXXXXXX XXXXXXgetcode()XXXXXXXXXXXX$icodeXXXXXXX XXXXXXXXXXX$strX\$strXXXXXXXX

    jcode.pl XXXXXXX XXXXXjcode::convert()X100%XXXXX XXXXX

XX
PerlX5.8.1XXXXXXJcodeXEncodeXXXXXXXXXXXXXXX XXXXJcodeXEncodeXXXXXXXXXXXXX

XX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX <utashiro@iij.ad.jp>XXPerl4XXXXXjcode.plXXXXXXXX

XX XX <ohzaki@iod.ricoh.co.jp>XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX

makamaka@donzoko.net X JEncode XXXJcodeXEncodeXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX

XXXJcode ML <jcode5@ring.gr.jp>XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX

XX
Encode

<http://www.iana.org/assignments/character-sets>

XXX
Copyright 1999-2005 Dan Kogai <dankogai@dan.co.jp>

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