Skip site navigation (1) Skip section navigation (2)

Re: bug in Google translate snippet

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pg-peter(at)alvh(dot)no-ip(dot)org
Subject: Re: bug in Google translate snippet
Date: 2009-07-02 21:33:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Hi,
> I was having a look at this snippet:
> and it turns out that it doesn't work if the result contains non-ASCII
> chars.  Does anybody know how to fix it?
> alvherre=# select gtranslate('en', 'es', 'he');
> ERROR:  plpython: function "gtranslate" could not create return value
> DETALLE:  <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128)

This looks like a python issue rather than a Postgres issue. The problem 
is probably in python-simplejson.



In response to


pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2009-07-02 21:35:08
Subject: Re: TODO items
Previous:From: Alvaro HerreraDate: 2009-07-02 21:29:42
Subject: Re: TODO items

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group