Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save 8maki/1277619 to your computer and use it in GitHub Desktop.
Save 8maki/1277619 to your computer and use it in GitHub Desktop.
urlencode_japanese_part_of_url
re.sub(u'([ぁ-ゞァ-ヾ一-龠0−9!?]+)', lambda m: urllib2.quote(m.group(0).encode('utf8')), k)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment