NAME
Lingua::Han::PinYin - Retrieve the PinYin of Chinese character.
SYNOPSIS
use Lingua::Han::PinYin;
# if the format of your script is gb2312, default
my $h2p = new Lingua::Han::PinYin();
print $h2p->han2pinyin("我");
# if the format of your script is utf-8
my $h2p = new Lingua::Han::PinYin(format => 'utf8');
print $h2p->han2pinyin("我");
DESCRIPTION
There is a Chinese document @ http://www.fayland.org/journal/Han2PinYin.html. It tells why and how I write this module.
RESTRICTIONS
if the character is polyphone(DuoYinZi), we can NOT point out the correct one.
OPTION
RETURN VALUE
if it's a common character, it returns its pinyin/spell.
if not, it returns 'XX';
SEE ALSO
AUTHOR
Fayland, fayland@gmail.com
COPYRIGHT
Copyright (c) 2005 Fayland All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 48:
Non-ASCII character seen before =encoding in '$h2p->han2pinyin("我");'. Assuming CP1252