From cd9f5ac8e2668f032c816c5a7705128fb8fc8ba7 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Wed, 30 Nov 2011 16:05:09 -0500 Subject: [PATCH] web: encode to utf-8 before submitting --- web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web.py b/web.py index dbeb5b5..dc5cee2 100755 --- a/web.py +++ b/web.py @@ -40,7 +40,7 @@ def head(uri): def post(uri, query): if not uri.startswith('http'): return - data = urllib.parse.urlencode(query) + data = urllib.parse.urlencode(query).encode('utf-8') u = urllib.request.urlopen(uri, data) bytes = u.read() try: