13
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

文字と濁点・半濁点が分かれていて,それらを結合したい時

例えば「レポート」という文字列をユニコードで扱うときに,
文字「ポ」が「ホ + ゜」 というように,文字と濁点・半濁点に分かれてしまう場合

join_dakuten.py
import unicodedata
unicodedata.normalize('NKFC', unistr)

この関数をかませれば
「ホ + ゜」を「ポ」として扱うことができる

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
13
Help us understand the problem. What are the problem?