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

拼音转换失败,仍然返回汉字,而且转换结果不稳定 #314

Open
Nian-Chen opened this issue Nov 30, 2023 · 1 comment
Open
Labels

Comments

@Nian-Chen
Copy link

运行环境

  • 操作系统(Linux/macOS/Windows):Linux
  • Python 版本:3.10
  • pypinyin 版本:0.49.0

问题描述

”车“字无法正常转拼音
而且两次pypinyin.pinyin("本次列车")的结果还不同
大佬帮忙看看是什么问题

问题复现步骤

pypinyin.pinyin("本次列⻋始发站为中国香港")
[['běn'], ['cì'], ['liè'], ['⻋'], ['shǐ'], ['fā'], ['zhàn'], ['wèi'], ['zhōng'], ['guó'], ['xiāng'], ['gǎng']]
pypinyin.pinyin("本次列车")
[['běn'], ['cì'], ['liè'], ['chē']]
pypinyin.pinyin("列⻋")
[['liè'], ['⻋']]
pypinyin.pinyin("本次列⻋")
[['běn'], ['cì'], ['liè'], ['⻋']]

@mozillazg
Copy link
Owner

结果是预期的。两个车字中有一个是异体字,不是汽车的车:

>>> ord('⻋')
11979
>>> ord('车')
36710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants