2010-04-05から1日間の記事一覧

[Python] [unicode] unicodedata だけで半角->全角の変換ができるか

# -*- coding: utf-8 -*- """ Unicode Standard Annex #11 East Asian Width: http://www.unicode.org/reports/tr11/tr11-14.html """ import unicodedata def convert(s, errors=''): assert isinstance(s, unicode) result = [] for c in s: #unicodedata.…