pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Subject: Re: can i use to_ascii function ?
Date: Fri, 23 Feb 2007 14:39:24 +0200
Message-ID: <200702231439.25906.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <46f93e0d0702230412i7a576ef9jd85c2823fa2c65e5@mail.gmail.com>
References: <46f93e0d0702230412i7a576ef9jd85c2823fa2c65e5@mail.gmail.com>

Στις Παρασκευή 23 Φεβρουάριος 2007 14:12, ο/η j n έγραψε:
> Hi
>
> i need to get rid of acute, and other special symbols from letters. Is any
> way how to do it easy in postgres ?
>
> i need conversion like this from slovak language ... :
>
> é, ě -> e
> á, ä -> a
> š -> s
>
> i tried :
>
> SELECT to_ascii('ščďť')
>
> i get an error : ERROR:  encoding conversion from UTF8 to ASCII not
> supported
>
> that i found something like this
>
> SELECT convert('ščďť', 'UTF8', 'LATIN1')
>
> i get an error : ERROR:  character 0xc5a1 of encoding "UTF8" has no
> equivalent in "LATIN1"
>
> Is any way how to do it ?
> If there is not build in support for this conversion can i create my own ?

Trying to resort to iso-8859-2 (the western slavic script) is not doing you 
any good, since you simply recode those chars in UTF-8 to their latin2
counterparts.

How about 
translate('your slovak text','éěáäš','eeaas');

>
> pls help

-- 
Achilleas Mantzios



view thread (5+ messages)  latest in thread

Message-ID: <200702231439.25906.achill@matrix.gatewaynet.com>
Permalink:  ../200702231439.25906.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/200702231439.25906.achill@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: can i use to_ascii function ?
  In-Reply-To: <200702231439.25906.achill@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox