Re: Unicode normalization

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Unicode normalization
Дата
Msg-id 20090917040157.GI13076@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Unicode normalization  (Andreas Kalsch <andreaskalsch@gmx.de>)
Ответы Re: Unicode normalization  (Sam Mason <sam@samason.me.uk>)
Re: Unicode normalization  (Andreas Kalsch <andreaskalsch@gmx.de>)
Список pgsql-general
Andreas Kalsch wrote:

> 2) Transfering this to PL/Python:
>
> CREATE OR REPLACE FUNCTION test (str text)
>  RETURNS text
> AS $$
>    import unicodedata
>    return unicodedata.normalize('NFKD', str.decode('UTF-8'))
> $$ LANGUAGE plpythonu;

This is wrong, which is why we published a correct version here:

http://wiki.postgresql.org/wiki/Strip_accents_from_strings

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: wrong error from ./configure in pgsql 8.3.8 for libxml
Следующее
От: Sulman Sarwar
Дата:
Сообщение: Re: Segmentation Fault during database restoration