/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# -*- coding: utf-8; -*- import urllib print urllib.quote('ã„ã‚ã¯ã«ã»ã¸ã¨') print urllib.quote(u'ã„ã‚ã¯ã«ã»ã¸ã¨'.encode('euc-jp')) print urllib.quote(u'ã„ã‚ã¯ã«ã»ã¸ã¨'.encode('shift_jis')) print urllib.quote(u'ã„ã‚ã¯ã«ã»ã¸ã¨'.encode('iso-2022-jp')) print urllib.quote(u'ã„ã‚ã¯ã«ã»ã¸ã¨') print urllib.unquote('%E3%81%84%E3%82%8D%E3%81%AF%E3%81%AB%E3%81%BB%E3%81%B8%E3%81%A8')
URL: http://python.g.hatena.ne.jp/mhrs/20060609/p1