ʞɔı*_*ɔıu 3 python unicode diacritics
如果你在python(2.x)中循环使用unicode字符串,请说:
ak.sɛp.tɑ
你怎么知道当前的char是否是一个组合变音符号?
例如,上面字符串中的最后一个字符实际上是一个组合标记:
ak.sɛp.tɑ - >
使用unicodedata模块:
import unicodedata
if unicodedata.combining(u'a'):
print "is combining character"
else:
print "is not combining"
Run Code Online (Sandbox Code Playgroud)
这些帖子也很重要
删除Python unicode字符串中重音的最佳方法是什么?
| 归档时间: |
|
| 查看次数: |
1372 次 |
| 最近记录: |