Re: bug in Google translate snippet

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: bug in Google translate snippet
Дата
Msg-id 4A4D27A4.80806@dunslane.net
обсуждение исходный текст
Ответ на bug in Google translate snippet  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: bug in Google translate snippet  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers

Alvaro Herrera wrote:
> Hi,
>
> I was having a look at this snippet:
> http://wiki.postgresql.org/wiki/Google_Translate
> 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
notin range(128)
 
>   

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

cheers

andrew




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: TODO items
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: TODO items