トップ 差分 一覧 ping ソース 検索 ヘルプ PDF RSS ログイン

Python ユニコードエスケープをデコード



目次



記事一覧

キーワード

Python ユニコードエスケープをデコードする

[Python][文字化け]


print content
{"body": "", "header": {"message": "\u65e2\u306b\u540c\u540d\u30e6\u30fc\u30b6\u30fc\u307e\u305f\u306f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002"}}

print content.decode('unicode_escape')
{"body": "", "header": {"message": "既に同名ユーザーまたはメールアドレスが登録されています。"}}



YAGI Hiroto (piroto@a-net.email.ne.jp)
twitter http://twitter.com/pppiroto

Copyright© 矢木 浩人 All Rights Reserved.