Problem with SQL_ASCII

From: Kai Hessing <kai(dot)hessing(at)hobsons(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem with SQL_ASCII
Date: 2005-03-03 14:23:04
Message-ID: 38okucF5od9psU1@individual.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a little problem in PostgreSQL 7.39 (and previous). Our database
is in 'SQL_ASCII'-Format. When doing SQL-Selects all special Characters
(e.g. äöüß, etc...) are ASCII encoded (sure they are). Is there any
function to change the encoding to - let's say - LATIN1 (reverse
function for to_ascii($text, 'LATIN1'))?
Otherwise, is it possible to write a function which just uses a
character replacement? I can image a select like:

Name in Table contains 'Ernst &amp; Young AG', select is:

SELECT from_ascii(name, 'LATIN1') FROM table;

And output should be 'Ernst & Young AG'

We do this now in a second step with a find/replace tool...
Anyone any idea? Thanks and
*greets*
Kai...

--
GnuPG-PublicKey -> http://www.hobsons.de/pgp/kai_hessing.asc

Gut ist nicht Nichtfreveln, sondern nicht einmal freveln wollen.
(Demokrit, um 460 v. Chr.)

Browse pgsql-sql by date

  From Date Subject
Next Message RobertD.Stewart 2005-03-03 14:39:49 Re: [WW Spam: medium] Building a database from a flat file
Previous Message Sean Davis 2005-03-03 13:42:51 Re: how to speed up these queries ?