Projects
View on GitHub
jifei/Pinyin
About
A simple, easy-to-use PHP class for converting Chinese characters to Pinyin. It can return full Pinyin or its abbreviations and accurately matches more than 6,000 Chinese characters.
Other ProjectsMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalPinyin
一个简单、准确的PHP中文转拼音的类
支持获取拼音以及拼音的缩写即首字母
支持utf-8、gbk等编码
能准确匹配6千多个常用汉字
单个汉字,一句话,中英文混合都完美支持
例子utf-8版
include_once 'Pinyin.php';
echo Pinyin::getPinyin("早上好");//获取拼音
echo Pinyin::getShortPinyin("早上好");//获取拼音缩写
例子gbk版
include_once 'Pinyin.php';
echo Pinyin::getPinyin("早上好",'gb2312');//获取拼音
echo Pinyin::getShortPinyin("早上好",'gb2312');//获取拼音缩写
Explore related projects
Loading…