File: README.cn

package info (click to toggle)
perl 5.10.1-17squeeze6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 74,280 kB
  • ctags: 49,087
  • sloc: perl: 319,380; ansic: 193,238; sh: 37,981; pascal: 8,830; lisp: 7,515; cpp: 3,893; makefile: 2,375; xml: 1,972; yacc: 1,555
file content (150 lines) | stat: -rw-r--r-- 4,054 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
If you read this file _as_is_, just ignore the funny characters you
see. It is written in the POD format (see perlpod manpage) which is
specially designed to be readable as is.

The following documentation is written in EUC-CN encoding.

һֱ༭ļ, صעַ.
ļ POD (ļʽ) д; ָʽΪֱĶ,
رƵ. ڴ˸ʽĽһϢ, ο perlpod ļ.

=encoding euc-cn

=head1 NAME

perlcn -  Perl ָ

=head1 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 ģ, дַΪλij, ʾ:

    #!/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 ȶԴϳ.

=head2 ı

Ҫı, Դ CPAN (L<http://www.cpan.org/>) 
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

=head2 һϢ

ο Perl ڸĴ˵ļ (ȫӢд), ѧϰ
Perl ֪ʶ, Լ Unicode ʹ÷ʽ. , ⲿԴ൱ḻ:

=head2 ṩ Perl Դַ

=over 4

=item L<http://www.perl.com/>

Perl ҳ (ŷ˾ά)

=item L<http://www.cpan.org/>

Perl ۺϵ (Comprehensive Perl Archive Network)

=item L<http://lists.perl.org/>

Perl ʵ̳һ

=back

=head2 ѧϰ Perl ַ

=over 4

=item L<http://www.oreilly.com.cn/html/perl.html>

İŷ Perl 

=back

=head2 Perl ʹ߼

=over 4

=item L<http://www.pm.org/groups/asia.html>

й Perl ƹһ

=back

=head2 Unicode ַ

=over 4

=item L<http://www.unicode.org/>

Unicode ѧѧ (Unicode ׼ƶ)

=item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>

Unix/Linux ϵ UTF-8  Unicode 

=back

=head1 SEE ALSO

L<Encode>, L<Encode::CN>, L<encoding>, L<perluniintro>, L<perlunicode>

=head1 AUTHORS

Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt>

Audrey Tang (Ʒ) E<lt>audreyt@audreyt.orgE<gt>

=cut