Skip to content

Instantly share code, notes, and snippets.

View yagays's full-sized avatar
🦊
hi

Yuki Okuda yagays

🦊
hi
View GitHub Profile
@yagays
yagays / nfkc_compare.txt
Last active May 25, 2018 00:50 — forked from ikegami-yukino/nfkc_compare.txt
Pythonのunicodedata.normalize('NFKC')で正規化される文字の一覧
# for Python 3.6
import unicodedata
# from 0 through 1,114,111 (https://docs.python.org/3.6/library/functions.html#chr)
for unicode_id in range(1114111):
char = chr(unicode_id)
normalized_char = unicodedata.normalize("NFKC", char)
if char != normalized_char:
if len(normalized_char) == 1:
code_point = ord(normalized_char)