Comments (8)
@aisq2008 感谢反馈。
我这边没法显示这个汉字,能否提供一下它的 Unicode 编码?
from go-pinyin.
这里有一个汉字的字典文件,里面好2万个汉字,你可以把这个文件遍历下
https://github.com/haiwen/seahub/blob/master/seahub/convert-utf-8.txt
from go-pinyin.
下面是一个例子,用于正则表达式提取汉字和拼音
html = 'ye2,ya1,ya2,ya3'
reg = r'([1-4])'
imgre = re.compile(reg)
imglist1 = re.findall(imgre,html)
print(imglist1)
reg = r'(.)([a-z]+[1-4]{0,1})'
imgre = re.compile(reg)
imglist = re.findall(imgre,html)
print(imglist)
print(imglist[0][0])
from go-pinyin.
@aisq2008 好的。我看看。
请问你标题中指的是下面两个汉字中的 u'\ue863'
这个汉字吗?
>>> ''.decode('utf-8')
u'\ue863'
>>> '䶮'.decode('utf-8')
u'\u4dae'
>>>
U+E863
这个汉字不是 Unicode 标准中的 CJK 汉字,所以才会没有拼音。
通过你的反馈才知道有这一类的汉字,之后会抽空把类似的汉字尽可能的加到拼音库中(如果有拼音的话)。
也欢迎你帮忙列一下类似的汉字或者向 mozillazg/pinyin-data 提交 PR。
参考:
- CSS 怎么处理生僻汉字? - 字体 - 知乎
- U+E863 PRIVATE USE CHARACTER – Codepoints
- 上“龙”下“天” GBK字 与 unicode字 䶮 - 中文信息处理 - 北大中文论坛 www.pkucn.com - Powered by Discuz!
from go-pinyin.
@aisq2008 已经可以获取这个汉字的拼音了。同时更新了几十个 PUA 汉字的拼音数据。
from go-pinyin.
建议把 PUA 汉字另按一个文件存放——Big5 的各种拓展(e.g. HKSCS)也有一组基本上不兼容的 PUA 映射,如果直接像现在这样加基本就是钦点了 GBK……
当然其实把 PUA 的东西直接叫做汉字就已经有钦定的意思了,啊,jIQeH。
from go-pinyin.
@Artoria2e5 谢谢你的建议,我先看看你提到的资料。
from go-pinyin.
@Artoria2e5 既然是拼音不就是指的是汉字吗
from go-pinyin.
Related Issues (20)
- 重庆返回的是 zhòng qìng HOT 1
- 重写Fallback Bug HOT 1
- 繁体字 鉆 返回 chān HOT 2
- beego引入包之后debug编译不过 HOT 1
- exec: "gcc": executable file not found in %PATH% HOT 2
- undefined: gojieba.NewJieba HOT 4
- go-pinyin支持修订多音字的发音吗 HOT 4
- 使用拼音库初始化的问题 HOT 1
- 地 返回 de
- 汉字、字母、数字混合的string,能保留非汉字吗 HOT 1
- 请问的支持多音字吗? HOT 1
- 烦请作者添加英文原样输出支持,谢谢~ HOT 2
- 能否支持自定义词库 HOT 1
- 字典不匹配希望保留 HOT 2
- 许多多音字错误 HOT 2
- 配置多音字后发现有不属于该汉字的发音 HOT 3
- cli工具安装要使用go install HOT 1
- 建议过滤相同的拼音返回 HOT 1
- 多音字转换不准确
- 性能提升
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-pinyin.