Quick ?s
Cheat Sheets
Man Pages
The Lynx
Software
PERLCN(1)	       Perl Programmers Reference Guide 	     PERLCN(1)



NAME
       perlcn -  Perl

DESCRIPTION
	Perl !

	5.8.0 , Perl  Unicode () ,
       ; CJK () .
       Unicode , : , ,
	(, , , , ,
       , ).  ( PC ).

       Perl  Unicode .	Perl  Unicode
       ; Perl  ()  Unicode .
       ,  Unicode , Perl
	Encode , .

       Encode  (gb2312	euc-cn):

	   euc-cn      Unix ,
	   gb2312-raw	() GB2312
	   gb12345
	   iso-ir-165  GB2312 + GB6345 + GB8565 +
	   cp936	936,  GBK ()
	   hz	       7  GB2312

       ,  EUC-CN  Unicode, :

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

       Perl  "piconv",	Perl ,
       :

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

       ,  encoding , , :

	   #!/usr/bin/env perl
	   #  euc-cn ;	euc-cn
	   use encoding euc-cn, STDIN => euc-cn, STDOUT => euc-cn;
	   print length("");		#  2 ()
	   print length();	      #  4 ()
	   print index("", ""); # -1 ()
	   print index(, ); #  1 ()

       , ""  ""  EUC-CN
	""; ""	""  "".
	EUC-CN .



       ,  CPAN ()
       Encode::HanExtra . :

	   gb18030     ,

       , Encode::HanConvert :

	   big5-simp   Big5  Unicode
	   gbk-trad    GBK  Unicode

	GBK  Big5 ,  b2g.pl  g2b.pl
       , :

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



	Perl  (),
       Perl ,  Unicode . , :

	Perl


       
	   Perl  ()

       
	   Perl  (Comprehensive Perl Archive Network)

       
	   Perl

	Perl


       
	    Perl

       Perl


       
	    Perl

       Unicode


       
	   Unicode  (Unicode )

       
	   Unix/Linux  UTF-8  Unicode

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

AUTHORS
       Jarkko Hietaniemi 

       Autrijus Tang () 



perl v5.8.8			  2008-04-25			     PERLCN(1)




Yals.net is © 1999-2009 Crescendo Communications
Sharing tech info on the web for more than a decade!
This page was generated Thu Apr 30 17:05:20 2009