Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Mathieu De Zutter
On 28/06/10 17:22, Neubert Joachim wrote: I want to convert accented characters to the according base character, e.g. "Ü" or "Ú" to "U". I have the following: CREATE OR REPLACE FUNCTION unaccent(TEXT) RETURNS TEXT AS $$ use Text::Unaccent; return unac_string('UTF8', $_[0]); $$ LANGU

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Thom Brown
On 28 June 2010 16:33, Thom Brown wrote: > On 28 June 2010 16:22, Neubert Joachim wrote: >> I want to convert accented characters to the according base character, e.g. >> "Ü" or "Ú" to "U". >> >> >> >> Is there a way to do this with pgsql functions? >> >> >> >> >> >>   postgres=# select convert('

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread John R Pierce
On 06/28/10 8:22 AM, Neubert Joachim wrote: I want to convert accented characters to the according base character, e.g. "Ü" or "Ú" to "U". Is there a way to do this with pgsql functions? translate(somestring, 'ÙÚÛÜŨŪŬŮŰŲùúûüũūŭůűų', 'UUuu') of course, expand those with a

Re: [GENERAL] convert accented character to base character

2010-06-28 Thread Thom Brown
On 28 June 2010 16:22, Neubert Joachim wrote: > I want to convert accented characters to the according base character, e.g. > "Ü" or "Ú" to "U". > > > > Is there a way to do this with pgsql functions? > > > > > >   postgres=# select convert('Ü', 'UTF8', 'SQL_ASCII'); > >    convert > >   -

[GENERAL] convert accented character to base character

2010-06-28 Thread Neubert Joachim
I want to convert accented characters to the according base character, e.g. "Ü" or "Ú" to "U". Is there a way to do this with pgsql functions? postgres=# select convert('Ü', 'UTF8', 'SQL_ASCII'); convert -- \303\234 did not work as I had hoped. Any help wou