diff --git a/modules/GoogleTranslate.py b/modules/GoogleTranslate.py index 1404352..62a8cf6 100644 --- a/modules/GoogleTranslate.py +++ b/modules/GoogleTranslate.py @@ -33,9 +33,6 @@ class GoogleTranslate(Module): fromlang = whats[1] tolang = whats[2] text = ' '.join(whats[3:]) - try: - text = text.encode('utf-8') - except UnicodeDecodeError: pass langpair = '%s|%s' % (fromlang, tolang) gt_url = 'http://ajax.googleapis.com/ajax/services/language/translate' @@ -46,9 +43,6 @@ class GoogleTranslate(Module): end_idx = translation.find('"}, "') translation = translation[:end_idx] - # decode the string, since it may include unicode. it will be encoded later. - translation = translation.decode('utf-8') - # do some text conversion translation = translation.replace('\\u0026quot;', '"') translation = translation.replace('\\u0026amp;', '&')