判断一个字符是否是组合变音符号
如果您在 python (2.x) 中循环 chars 一个 unicode 字符串,请说:
ak.sɛp.tɑ̃
如何判断当前字符是否是组合变音符号?
例如,上面字符串中的最后一个字符实际上是一个组合标记:
ak.sɛp.tɑ̃ --> ̃
if you're looping though the chars a unicode string in python (2.x), say:
ak.sɛp.tɑ̃
How can you tell whether the current char is a combining diacritic mark?
For instance, the last char in the above string is actually a combining mark:
ak.sɛp.tɑ̃ --> ̃
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 unicodedata 模块:
这些帖子也相关
如何反转 Unicode 分解使用Python?
删除 Python unicode 字符串中的重音符号的最佳方法是什么?
Use the unicodedata module:
these posts are also relevant
How do I reverse Unicode decomposition using Python?
What is the best way to remove accents in a Python unicode string?