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aeXXeXXaaXX Unicode eXXeXXaeXXaeXX. aaXXeXXaaXXaaXXeXXaaXXaeXX, aeXXaeXXaaXXcXXaeXX Unicode aeXXaaXXcXXcXXc XaeXXaaXXaaXaeXXcXXaeXXaeXX, Perl aeXXaeXXaeXX Encode eXXaeXXaeXXaaXX, aaXXaeXXeXXaeX eXXaeXXaaXXeXXaaXXaaXXaaXXaaXXaeXXaeXXcXXcXXc XaeXXaeXX.

Encode aaXXaeXXaeXXaaXXaeXXaeXXaeXXaaXXcXXaeXXaeXaeXXcXXcXXc XaeXXaaXX ('gb2312' eXXcXX 'euc-cn'):

    euc-cn      Unix aaXXaeXXaaXcXXeXX, aeXXaaXXaeXXaeXXcXXcXXaaXXae Xc X
    gb2312-raw  aeXXcXXaaXXcXXcXX (aeXXaeXXcXX) GB2312 aaXcXXeXX
    gb12345     aeXXcXXaaXXcXXcXXaeXaaXXcXXcXXaeXXaeXaeXXcXXc X
    iso-ir-165  GB2312 + GB6345 + GB8565 + aeXXaaXXaaXcXX
    cp936       aaXc XeXX 936, aeXXaaXXaeXXcXX 'GBK' (aeXXaaXXaaXXae Xc X) aeXXaeXX
    hz          7 aeXXcXXeXXaaXXaaXX GB2312 cXXc X

aeXXaeXXaeXXeXX, aaXX EUC-CN cXXc XcXXaeXXaeXXeXXaeXX Unicode, cXXeXXeXXaaXXaeXXaaXXaeXXaeXX:

    perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8

Perl aeXXaaXXeXXaeXX "piconv", aeXXaeXXaaXXaaXXaeXX Perl aaXXaeXXcXXaaXcXXeXXaeXXaaXXaaXXcXXaaXX, cXXaeXXaaXXaeXX:

    piconv -f euc-cn -t utf8 < file.euc-cn > file.utf8
    piconv -f utf8 -t euc-cn < file.utf8 > file.euc-cn

aaXXaaXX, aaXXcXX encoding aeXXaaXX, aeX aaXXaeXXeXXaeXXaaXXaaXXaeXXaaXcXXaeXXaaXXaeXXcXXcXXaaXXc X, aaXXaeXXaeXXcXX:

    #!/usr/bin/env perl
    # aaXXaaXX euc-cn aaXaeXXeXXaeXX; ae XaaXXeXXaaXXaaXXaaXXae XaaXXeXXeXXeXXeXXaeXX euc-cn cXXc X
    use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn';
    print length("eXXeXX");          #  2 (aaXXaaXXaaXXeXXcXXaaXcXX)
    print length('eXXeXX');          #  4 (aaXXaaXXaaXXeXXcXXaaXeXX)
    print index("eXXeXXaeXXeXX", "eXXaaXX"); # -1 (aeXXaaXXaaXXaeXaaXaaXcXXaeXX)
    print index('eXXeXXaeXXeXX', 'eXXaaXX'); #  1 (aeXXcXXaeXXaeXXaaXeXXaaXXaaXX)

aaXXaeXXaaXXaeXXaaXXaeXXaaXeXX, "eXX" cXXcXXaeXXaeXXaaXeXXaeXX "eXX" cXXcXXaeXXaeXXaaXeXXcXXaaXXaeXX EUC-CN c XcXX "eXX"; "eXX" cXXcXXaeXXaeXXaaXeXXaaXXaeXX "aeXX" cXXcXXaeXXaeXXaaXeXXcXXaaXXaeXX "aaXX". eXXeXXaaXXaeXXaeXXaaXX EUC-CN c XaeXXaaXXaaXXcXXaeXXaaXXeXXcXXeXXeXX.

  eXXaaXXcXXaeXaeXXcXXc X
aaXXaeXXeXXeXXaeXXaaXXcXXaeXaeXXcXXc X, aaXXaeXXaeXX CPAN (<http://www.cpan.org/>) aeXXeXX Encode::HanExtra aeXXaaXX. aaXXcXXaaXXaeXXaeXXaeXXaaXXcXXc XaeXXaaXX:

    gb18030     aeXXaaXXeXXcXXaaXXae Xc X, aaXXaaXXcXXaeXXaeXaeXX

aaXXaaXX, Encode::HanConvert aeXXaaXXaaXXaeXXaeXXaeXXcXXcXXeXXaeXXcXXcXXaeXXcXXcXXc X:

    big5-simp   Big5 cXXaeXXaeXaeXXaeXX Unicode cXXaeXXaeXaeXXaeXXeXX
    gbk-trad    GBK cXXaeXXaeXaeXXaeXX Unicode cXXaeXXaeXaeXXaeXXeXX

eXXaeXXaaXX GBK aeXX Big5 aeXXeXXaeXXeXX, eXXaaXXeXXeXXaeXXaaXXaaXXeXXcXX b2g.pl aeXX g2b.pl aeXXaeXXcXXaaXX, aeXXaaXXcXXaaXXaaXXaeXXcXXaeXXaaXXaaXXaeXX:

    use Encode::HanConvert;
    $euc_cn = big5_to_gb($big5); # aeXX Big5 eXXaeXX GBK
    $big5 = gb_to_big5($euc_cn); # aeXX GBK eXXaeXX Big5

  eXXaeXXaeXcXXaeXXaeXX
eXXaaXXeXX Perl aaXXeXXcXXaaXXeXXeXXaeXXaeXXaeXX (aeXXaaXXaaXXaeXXcXXeXXaeXXaaXXcXX), aeXXaaXaeX aeXXaaXXaaXXaeXX Perl cXXcXXeXX, aeXXaaXX Unicode cXXaeXXcXXaeXXaaXX. aeXXeXX, aaXXeXXcXXeXXaeXXcXXaaXXaeXXaaXX:

  aeXXaeXX Perl eXXaeXXcXXcXXaaXX

<http://www.perl.com/>
    Perl cXXeXXeXX (cXXaeXXeXXcXXaaXXaaXXcXXaeXX)

<http://www.cpan.org/>
    Perl cXXaaXXaaXXeXXcXX (Comprehensive Perl Archive Network)

<http://lists.perl.org/>
    Perl eXXeXXeXXaaXXaeXXeXX

  aaXaeX Perl cXXcXXaaXX

<http://www.oreilly.com.cn/index.php?func=booklist&cat=68>
    cXXaeXXaeXaeXXcXXcXXaeXXeXXcXX Perl aeXXeXX

  Perl aeXXcXXeXXeXXaeXX

<http://www.pm.org/groups/asia.html>
    aeXaaXX Perl aeXXaaXXcXXaeXXeXX

  Unicode cXXaaXXcXXaaXX

<http://www.unicode.org/>
    Unicode aaXaeXXaaXaeXX (Unicode ae XaaXXcXXaaXXaaXXeXX)

<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
    Unix/Linux aeXXcXX UTF-8 aaXX Unicode cXaaXXeXX

SEE ALSO
Encode, Encode::CN, encoding, perluniintro, perlunicode

AUTHORS
Jarkko Hietaniemi <jhi@iki.fi>

Audrey Tang (aaXXaaXX) <audreyt@audreyt.org>

POD ERRORS
Hey! The above document had some coding errors, which are explained below:

Around line 1:
    This document probably does not appear as it should, because its "=encoding utf8" line calls for an unsupported encoding. [Encode.pm v?'s supported encodings are: ]

    Couldn't do =encoding utf8: This document probably does not appear as it should, because its "=encoding utf8" line calls for an unsupported encoding. [Encode.pm v?'s supported encodings are: ]