Skip to content

Instantly share code, notes, and snippets.

@ohnishiakira
Created June 25, 2013 13:46
Show Gist options
  • Save ohnishiakira/5858552 to your computer and use it in GitHub Desktop.
Save ohnishiakira/5858552 to your computer and use it in GitHub Desktop.
濁点が分かれてる文字を正規化(?)する
"た゛くてんか゛ふ゛んりされてるもし゛".gsub("\u309B", "\u3099").gsub("\u309C", "\u309A").encode("UTF-8", "UTF-8-MAC")
# => "だくてんがぶんりされてるもじ"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment