overtrue / pinyin

🇨🇳 基于词库的中文转拼音优质解决方案

Home Page:https://github.com/overtrue/pinyin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

为什么拼音里有a的会有问题呢?

xcapis opened this issue · comments

PHP7.3.1
nginx
使用composer require "overtrue/pinyin:~4.0"进行安装
代码如下
`
require(dirname(FILE) . '/vendor/autoload.php');

use Overtrue\Pinyin\Pinyin;

$pinyin = new Pinyin();

$a = $pinyin->convert('带着希望去旅行,比到达终点更美好');

print_r($a);
`
输出以下内容

Array
(
[0] => d�
[1] => i
[2] => zhe
[3] => xi
[4] => w�
[5] => ng
[6] => qu
[7] => lyu
[8] => xing
[9] => bi
[10] => d�
[11] => o
[12] => da
[13] => zhong
[14] => dian
[15] => geng
[16] => mei
[17] => hao
)

经测试,不管是abbr还是convert。前面几个有问题的都有问题

Same issue,
澳佳宝 儿童益生菌 30袋
�-o-jia-bao-er-tong-yi-sheng-jun-30-d�-i

我刚也遇到了这个问题,所有带有a的拼音都转不了,退回到3.0版本没问题!

已修复 #119