Jcode.pm

Perl の中での漢字コード変換を行なう
jcode.pl に代わる Perl Module Jcode.pm

URL

配布元 (by Dan Kogai さん)
http://openlab.ring.gr.jp/Jcode/index-j.html
Jcodeを使おう(実用本位のJcode紹介) (by 西山さん)
(中身に関係ないが css が効果的に使われている)
http://www.netfort.gr.jp/~kiyoka/jcode_intro/
Jcode.pmをWindows 2000でコンパイルする (高橋 誠)
http://homepage2.nifty.com/hobbit/html/jcode.html
jcode.pl (歌代さん)
http://srekcah.org/jcode/

使い方の説明

perl 一般の方法として (Jcode.pm を既に入れてあれば.. 入れ方は下に少し書いてあります)
perldoc Jcode
とすれば、英語で使い方の説明が表示される。例えば次のような表示がある。
        # traditional
        Jcode::convert(\$str, $ocode, $icode, "z");
        # or OOP!
        print Jcode->new($str)->h2z->tr($from, $to)->utf8;
しかし、例えばこの z の意味は jcode.pl の方にしか書いてない気がする。 jcode.pl より
Optional parameter $option is used to specify optional conversion method. String "z" is for JIS X0201 KANA to X0208 KANA, and "h" is for reverse.

NetBSD/pkgsrc

NetBSD で利用する場合、/usr/pkgsrc の下で make するか pkg_add すればいい。以下では /usr/pkgsrc の下のどこかを示している。

japanese/p5-Jcode

Jcode.pm は 大文字の japanese/p5-Jcode にある。
make とすると、次のようなことを言われるかも知れないが無視
Your perl and your Config.pm seem to have different ideas about the architecture
they are running on.
Perl thinks: [powerpc-netbsd]
Config says: [powerpc-netbsd]
This may or may not cause problems. Please check your installation of perl if you
have problems building this extension.
(03/07/2001) 最新は 0.79 だけれど pkgsrc だと 0.76 が入った。これは僕の pkgsrc が古いせい。 01/16/2002 に 0.79 になっている。

japanese/p5-jcode

jcode.pl の方は 小文字の japanese/p5-jcode
makoto@u  9:16:11/020307(...japanese/p5-jcode)# pkg_info p5-jcode
Information for p5-jcode-2.13:

Comment:
Perl library for Japanese character code conversion

Requires:
perl>=5.0

Description:
jcode.pl is Perl library for Japanese character code conversion.
It supports translation of each JIS, EUC, Shift JIS texts, and
automatically recognizes the encode-method of the target text files.

Document is in jcode.pl itself as comment.
And jcode.pl-history file (in Japanese) might help you:
        ftp://ftp.iij.ad.jp/pub/IIJ/dist/utashiro/perl/jcode.pl-history
        ftp://ftp.sra.co.jp/pub/lang/perl/sra-scripts/jcode.pl-history

Homepage:

Last Update

19:53:44 03/12/08
claudebot
Apache/2.0.65 (Unix) mod_ssl/2.0.65 OpenSSL/1.0.1g DAV/2 PHP/5.4.26
Count.cgi
(since 2002/03/09)