We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在写一个用户管理系统,用户头像的存储是使用 年级 + 中文名字的拼音 构成的,因此调用了这个类库,但在测试时,发现 堃 ( kun ) 字没有被转为拼音( 摔呀,这还是我自己的名字 )。 测试代码如下
require '../vendor/autoload.php'; use Overtrue\Pinyin\Pinyin; Pinyin::set('delimiter',''); Pinyin::set('accent',false); // 设置 中文转拼音 类库, 无分隔,无音调 $name = '堃'; $name_pinyin = Pinyin::trans($name); // 获取拼音 echo $name_pinyin;
输出结果( 直接输出了原汉字 ):
同时测试了几个少见的字,都能够正确输出。
The text was updated successfully, but these errors were encountered:
e22bd9e
@magichan 是词库没有这个字的原因,已经补充,请更新到 2.6.3 版本
composer update overtrue/pinyin
Sorry, something went wrong.
补充词库 Fixes #28
a443ab4
No branches or pull requests
我在写一个用户管理系统,用户头像的存储是使用 年级 + 中文名字的拼音 构成的,因此调用了这个类库,但在测试时,发现 堃 ( kun ) 字没有被转为拼音( 摔呀,这还是我自己的名字 )。
测试代码如下
输出结果( 直接输出了原汉字 ):
同时测试了几个少见的字,都能够正确输出。
The text was updated successfully, but these errors were encountered: