From 07b83e912a69a7de64a1855989142c22be71d083 Mon Sep 17 00:00:00 2001 From: Maceo Woodward Date: Sat, 16 Jul 2011 03:43:05 -0400 Subject: [PATCH] In translate() function, changed text to be translated in parameters dictionary to UTF-8 encoding. Conversion is needed to allow Japanese strings to be passed to urlencode(). --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index e9e6d18..fb78cdf 100644 --- a/__init__.py +++ b/__init__.py @@ -82,7 +82,7 @@ def translate(self, text, to_lang, from_lang=None, supported category is "general". """ params = { - 'text': text, + 'text': text.encode('utf8'), 'to': to_lang, 'contentType': content_type, 'category': category,