Skip to content
New issue

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

'堃' 字无法转换为拼音 #28

Closed
magichan opened this issue Oct 27, 2015 · 1 comment
Closed

'堃' 字无法转换为拼音 #28

magichan opened this issue Oct 27, 2015 · 1 comment

Comments

@magichan
Copy link

我在写一个用户管理系统,用户头像的存储是使用 年级 + 中文名字的拼音 构成的,因此调用了这个类库,但在测试时,发现 ( 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;

输出结果( 直接输出了原汉字 ):
image

同时测试了几个少见的字,都能够正确输出。

@overtrue
Copy link
Owner

@magichan 是词库没有这个字的原因,已经补充,请更新到 2.6.3 版本

composer update overtrue/pinyin

overtrue added a commit that referenced this issue Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants