Re: Unicode normalization

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andreas Kalsch <andreaskalsch(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unicode normalization
Date: 2009-09-17 04:01:57
Message-ID: 20090917040157.GI13076@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sulman Sarwar 2009-09-17 04:36:05 Re: Segmentation Fault during database restoration
Previous Message Scott Marlowe 2009-09-17 03:31:30 Re: wrong error from ./configure in pgsql 8.3.8 for libxml