Remove diacritical marks in SQL

From: Jiří Němec <konference(at)menea(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Remove diacritical marks in SQL
Date: 2007-01-12 21:16:22
Message-ID: 16651036.20070112221622@menea.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I would like to remove diacritical marks from a string in a SQL query.
I tried to convert a UTF8 string to ASCII but it doesn't work for me.

SELECT convert('ěščřžýáíé','UTF8','SQL_ASCII')

array(1) {
["convert"]=>
string(18) "ěščřžýáíé"
}

Thanks for any advice,

J.N.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aleksander Kmetec 2007-01-12 21:27:32 Custom index type for indexing long texts?
Previous Message Alvaro Herrera 2007-01-12 20:54:30 Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0