感谢Lingua::Han::PinYin原作者(www.fayland.org/journal/Han-PinYin.html)的工作.¶ ↑
Author H.J.Leochen ( www.upulife.com ) work on coding, I just move it to a gem and plugin for rails usage¶ ↑
Builder: Allen Chan (allenchan.com.cn)¶ ↑
Pinyin (permlink)- Convert Chinese Characters to Pinyin letters, better usage in Rails as gem or plugins¶ ↑
$ sudo gem install Pinyin --source http://gem.github.com
require 'rubygems' require 'pinyin' py = Pinyin.new py.to_permlink("**")
py.to_pinyin_abbr("**")
-
多音字不知道怎么处理
-
英文中文夹杂的string中间英文和中文字相间的会没有separator