#!/usr/bin/perl # Created On : Mon Apr 14 05:23:07 2008 # Last Modified On: Fri Apr 16 02:02:56 2010 # Update Count : 296 =encoding utf8 =head1 NAME zhuyin2hanyu -- Zhuyinfuhao to Hanyu Pinyin converter =head1 USAGE EXAMPLES $ grep 祿 libchewing-*/data/tsi.src|tee /dev/stderr|zhuyin2hanyu 俸祿 5 ㄈㄥˋ ㄌㄨˋ 俸祿 5 feng4 lu4 =head1 DESCRIPTION Attempt to convert Taiwan's Chinese Zhuyinfuhao (注音符號, Bopompofo) phonetics to Hanyu Pinyin (漢語拼音) with the least amount of lines of code. =head1 COPYRIGHT http://www.fsf.org/copyleft/gpl.html =head1 AUTHOR 積丹尼 Dan Jacobson http://jidanni.org/lang/pinyin/ =cut use strict; use warnings FATAL => 'all'; use utf8; binmode STDIN, ":utf8"; binmode STDOUT, ":utf8"; while (<>) { s/\Bㄨㄥ/ong/g; s/ㄩㄥ/iong/g; s/(?