NAME

Lingua::Han2PinYin - convert Chinese character(Mandarin) to its pinyin.

SYNOPSIS

use Lingua::Han2PinYin;

# if the format of your script is gb2312, default
my $h2p = new Lingua::Han2PinYin();
print $h2p->han2pinyin("我");

# if the format of your script is utf-8
my $h2p = new Lingua::Han2PinYin(format => 'utf8');
print $h2p->han2pinyin("我");

DESCRIPTION

There is a Chinese document @ http://www.1313s.com/f/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

Unicode::Unihan

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