Andrew Dunstan wrote:
> Alvaro Herrera wrote:
>> 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.
I think the problem happens when the PL tries to create the output
value. Otherwise I wouldn't be able to see the value in plpy.log.
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
In response to
pgsql-hackers by date
|Next:||From: Andrew Dunstan||Date: 2009-07-02 21:43:43|
|Subject: Re: TODO items|
|Previous:||From: Tom Lane||Date: 2009-07-02 21:39:08|
|Subject: Re: PGXS problem with pdftotext |