perlcn -  Perl 


    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 
       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 ,
   , :

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

    Perl  (), 
   Perl ,  Unicode . , :

       Perl  ()

       Perl  (Comprehensive Perl Archive Network)




       Unicode  (Unicode )

       Unix/Linux  UTF-8  Unicode 


   Encode, Encode::CN, encoding, perluniintro, perlunicode


   Jarkko Hietaniemi <>

   Audrey Tang () <>

More Linux Commands

oLschema2ldif(1) Converts LDAP schema's to LDBcompatible LDI
oLschema2ldif is a simple tool that converts standard OpenLDAP schema files to a LDIF format that is understood by LDB. OPTIONS -I input-file OpenLDAP schema to

Tcl_Release(3) - avoid freeing storage while it is being use
These three procedures help implement a simple reference count mechanism for managing storage. They are designed to solve a problem having to do with widget del

set_menu_pattern(3menu) - get and set a menu's pattern buffe
Every menu has an associated pattern match buffer. As input events that are printable characters come in, they are appended to this match buffer and tested for

fnmatch(3am) compare a string against a filename wildcard...
The fnmatch extension provides an AWK interface to the fnmatch(3) routine. It adds a single function named fnmatch(), one predefined variable (FNM_NOMATCH), and

Tk_UnderlineChars(3) - routines to measure and display simpl
These routines are for measuring and displaying simple single-font, single-line strings. To measure and display single-font, multi-line, justified text, refer t

killall5(8) - send a signal to all processes. (Man Page)....
killall5 is the SystemV killall command. It sends a signal to all processes except kernel threads and the processes in its own session, so it wont kill the shel

wecho_wchar(3ncurses) - add a complex character and renditio
The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the complex character wch into the given window at its current position, which is then advanced.

keyctl_unlink(3) - Link a key to a keyring keyctl_unlink - U
keyctl_link() creates a link from keyring to key, displacing any link to another key of the same type and description in that keyring if one exists. keyctl_unli

ssh-add(1) - adds private key identities to the authenticati
ssh-add adds private key identities to the authentication agent, ssh-agent(1). When run without arguments, it adds the files ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ss

qt4options(7) - Common commandline options for all applicati
Qt application [Qt Generic Options] OPTIONS The following options apply to all Qt(TM) applications: display displayname Use the Xserver display displayname..

IP::Country::Medium(3pm) - cached lookup of country codes by
See documentation for IP::Country. In addition, IP::Country::Medium objects have a cache() method, which controls whether hostname-&gt;cc lookups are cached (on by

dbilogstrip(1) - filter to normalize DBI trace logs for diff
Replaces any hex addresses, e.g, 0x128f72ce with 0xN. Replaces any references to process id or thread id, like pid#6254 with pidN. So a DBI trace line like this

We can't live, work or learn in freedom unless the software we use is free.