I have some accents/diacritics in a Unicode string that I want to convert into their 'combining form' (per the Unicode standard). For example, if I have \N{CIRCUMFLEX ACCENT} (\u005E) or \N{MODIFIER LETTER CIRCUMFLEX ACCENT} (\u02C6), I want to convert it to \N{COMBINING CIRCUMFLEX ACCENT} (\u0302). Is there any consistent, reliable method for doing this for any diacritical mark? If the Python (3.9) standard library has in-built support for it (perhaps via the unicodedata module), that would be ideal, but I'm happy to use a pip package for this too.
2021年3月20日星期六
Convert diacritic or modifier diacritic Unicode character to 'combining form'
订阅:
博文评论 (Atom)
没有评论:
发表评论