On Tue, Apr 16, 2002 at 10:35:36AM +0900, Dan Kogai wrote: > http://www.dan.co.jp/~dankogai/bleedperl/
Wonderful. I learned quite a bit Japanese just by reading the Kanji and try to read out Katagana characters, and was generally able to understand the whole article. :) (I wonder if Kogai-san can similarily read .tw and .cn, and which is the easier one. Probably the Simplified version?) > "00" was prepended to all file names so Apache is happy. Originals as > well as pod2htmlized versions available. they all look great in > Mozilla, okay in IE (on MacOS X). Attached are the proofread versions from Taipei.pm and ORA Taiwan; they should be the final version unless some serious bug surfaces. > Tokyo.pm members, please take a look at them and tell me what you guys > think. *sigh* I missed the YARPC; any plans to do a YAPC::Asia any time soon? At least we have active Tokyo and Taipei mongers, and it seems (from their web page) that Seoul.pm is also quite lively. :) Some nitpicks to .kr and .jp: .kr had a verbatim English paragraph near the beginning of article, which seems redundant to me. Also, both refer to the FOO encoding, which might or might not be intentional. Thanks, /Autrijus/
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 Big5 encoding.
�p�G�A�Τ@�몺��r�s�边�\���o�����, �Щ����夤�_�S�����O�r��.
�o�����O�H POD (²�����榡) �g��; �o�خ榡�O���F�����H����Ū��,
�ӯS�O�]�p��. ���榡���i�@�B��T, �аѦ� perlpod �u�W���.
=head1 NAME
perltw - ���餤�� Perl ���n
=head1 DESCRIPTION
�w��Ө� Perl ���Ѧa!
�q 5.8.0 ���}�l, Perl ��ƤF������ Unicode (�U��X) �䴩,
�]�s�a�䴩�F�\�h�ԤB�y�t�H�~���s�X�覡; CJK (������) �K�O�䤤���@����.
Unicode �O��کʪ��з�, �չϲ[�\�@�ɤW�Ҧ����r��: ���@��, �F��@��,
�H�Ψ�̶����@�� (��þ��, �ԧQ�Ȥ�, ���ԧB��, �ƧB�Ӥ�, �L�פ�,
�L�a�w��, ����). ���]�e�ǤF�h�ا@�~�t�λP���O (�p PC �γ�����).
Perl �����H Unicode �i��ާ@. �o���� Perl �������r���ƥi�� Unicode
����; Perl ���禡�P��� (�Ҧp���W���ܦ����) �]��� Unicode �i��ާ@.
�b��J�ο�X��, ���F�B�z�H Unicode ���e���s�X�覡�x�s�����, Perl
���ѤF Encode �o�ӼҲ�, �i�H���A�����aŪ���μg�J�¦����s�X���.
Encode �����Ҳդ䴩�U�C���餤�媺�s�X�覡:
big5 ��l�� Big5 �s�X (�t�ʤѤ��r��)
big5-hkscs Big5 + ����~�r��
cp950 �r�X�� 950 (Big5 + �L�n�K�[���r��)
�|�Ҩӻ�, �N Big5 �s�X���ɮ��ন Unicode, ������J�U�C���O:
perl -Mencoding=big5,STDOUT,utf8 -pe1 < file.big5 > file.utf8
Perl �]�����F "piconv", �@�䧹���H Perl �g�����r���ഫ�u��{��, �Ϊk�p�U:
piconv -f big5 -t utf8 < file.big5 > file.utf8
piconv -f utf8 -t big5 < file.utf8 > file.big5
�t�~, �Q�� encoding �Ҳ�, �A�i�H�����g�X�H�r�Ŭ���쪺�{���X, �p�U�ҥ�:
#!/usr/bin/env perl
# �Ұ� big5 �r��ѪR; �зǿ�X�J�μзǿ��~���]�� big5 �s�X
use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';
print length("�d�m"); # 2 (�������ܦr��)
print length('�d�m'); # 4 (������ܦ줸��)
print index("�ναл�", "να"); # -1 (���]�t���l�r��)
print index('�ναл�', 'να'); # 1 (�q�ĤG�Ӧ줸�ն}�l)
�b�̫�@�C�Ҥl��, "��" ���ĤG�Ӧ줸�ջP "��" ���Ĥ@�Ӧ줸�յ��X�� Big5
�X�� "ν"; "��" ���ĤG�Ӧ줸�իh�P "��" ���Ĥ@�Ӧ줸�յ��X�� "α".
�o�ѨM�F�H�e Big5 �X���B�z�W�`�������D.
=head2 �B�~������s�X
�p�G�ݭn��h������s�X, �i�H�q CPAN (L<http://www.cpan.org/>) �U��
Encode::HanExtra �Ҳ�. ���ثe���ѤU�C�s�X�覡:
euc-tw Unix �����r�Ŷ�, �]�t CNS11643 ���� 1-7
big5plus ����Ʀ�ƧN���s����|�� Big5+
�t�~, Encode::HanConvert �Ҳիh���ѤF²�c�ഫ�Ϊ���ؽs�X:
big5-simp Big5 ���餤��P Unicode ²�餤�夬��
gbk-trad GBK ²�餤��P Unicode ���餤�夬��
�Y�Q�b GBK �P Big5 ��������, �аѦҸӼҲդ����� b2g.pl �P g2b.pl ���{��,
�Φb�{�����ϥΤU�C�g�k:
use Encode::HanConvert;
$euc_cn = big5_to_gb($big5); # �q Big5 �ର GBK
$big5 = gb_to_big5($euc_cn); # �q GBK �ର Big5
=head2 �i�@�B����T
�аѦ� Perl �������j�q������� (�������O�έ^��g��), �ӾDzߧ�h����
Perl ������, �H�� Unicode ���ϥΤ覡. ���L, �~�����귽�۷��״I:
=head2 ���� Perl �귽�����}
=over 4
=item L<http://www.perl.com/>
Perl ������ (�Ѽڵ�§���q���@)
=item L<http://www.cpan.org/>
Perl ��X���ú� (Comprehensive Perl Archive Network)
=item L<http://lists.perl.org/>
Perl �l���¤@��
=back
=head2 �Dz� Perl �����}
=over 4
=item L<http://www.oreilly.com.tw/chinese/perl/index.html>
���餤�媩���ڵ�§ Perl ����
=item L<http://groups.google.com/groups?q=tw.bbs.comp.lang.perl>
�O�W Perl �s�u�Q�װ� (�]�N�O�U�j BBS �� Perl �s�u��)
=back
=head2 Perl �ϥΪ̶��|
=over 4
=item L<http://www.pm.org/groups/asia.shtml#Taiwan>
�O�W Perl ���s�դ@��
=item L<http://irc.elixus.org/>
���ߨ�u�W��ѫ�
=back
=head2 Unicode �������}
=over 4
=item L<http://www.unicode.org/>
Unicode �dzN�Ƿ| (Unicode �зǪ���w��)
=item L<http://www.cl.cam.ac.uk/%7Emgk25/unicode.html>
Unix/Linux �W�� UTF-8 �� Unicode ���Ȱ�
=head2 ����Ƹ�T
=item ������s "���餤��" ���s "�c�餤��"?
L<http://www.csie.ntu.edu.tw/~b7506051/mozilla/faq.html#faqglossary>
=item ����Ƴn���p��
L<http://www.cpatch.org/>
=item Linux �n�餤��ƭp��
L<http://www.linux.org.tw/CLDP/>
=back
=head1 SEE ALSO
L<Encode>, L<Encode::TW>, L<encoding>, L<perluniintro>, L<perlunicode>
=head1 AUTHORS
Jarkko Hietaniemi E<lt>[EMAIL PROTECTED]<gt>
��v�~ E<lt>[EMAIL PROTECTED]<gt>
=cut
f 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 �����ļ�.
=head1 NAME
perltw - �������� Perl ָ��
=head1 DESCRIPTION
��ӭ���� Perl �����!
�� 5.8.0 �濪ʼ, Perl �߱������Ƶ� Unicode (ͳһ��) ֧Ԯ,
Ҳ����֧Ԯ������������ϵ����ı��뷽ʽ; CJK (��?պ?) �������е�һ����.
Unicode �ǹ����Եı�, ��ͼ�������������е��ַ�: ��������, ��������,
�Լ������һ�� (ϣ����, ��������, ��������, ϣ������, ӡ����,
ӡ�ذ���, �ȵ�). ��Ҳ?����˶�����ҵϵͳ��ƽ�? (?? PC �������).
Perl ������ Unicode ���в���. ���ʾ Perl �ڲ����ַ������ݿ��� Unicode
��ʾ; Perl �ĺ�ʽ����� (��?��?���ʾʽ�ȶ�) Ҳ�ܶ� Unicode ���в���.
����?뼰����?, Ϊ�˴����� Unicode ֮ǰ�ı��뷽ʽ���������, Perl
�ṩ�� Encode ���ģ��, ����?������ض�ȡ��д����еı����?��.
Encode ����ģ��֧Ԯ���м������ĵı��뷽ʽ:
euc-cn Unix �����ַ���, Ҳ�����׳ƵĹ�����
gb2312 δ�������� (�ͱ���) 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.shtml#China>
�й� 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>[EMAIL PROTECTED]<gt>
���ں� E<lt>[EMAIL PROTECTED]<gt>
=cut
msg01173/pgp00000.pgp
Description: PGP signature
