エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント3件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
[Python] [unicode] unicodedata だけで半角->全角の変換ができるか - chrono-meterの日記
# -*- coding: utf-8 -*- """ Unicode Standard Annex #11 East Asian Width: http://www.unicode.org/r... # -*- 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.east_asian_width(c) == 'H' name = unicodedata.name(c, '') if name.startswith('HALFWIDTH '): try: c = unicodedata.lookup(name[10:]) except LookupError: print name
2010/08/18 リンク