Re: Changing character set when the damage is done - Mailing list pgsql-sql

From Ragnar
Subject Re: Changing character set when the damage is done
Date
Msg-id 1166831523.6369.308.camel@localhost.localdomain
Whole thread Raw
In response to Changing character set when the damage is done  (Alexis Paul Bertolini <bertolini@computer.org>)
Responses Re: Changing character set when the damage is done
List pgsql-sql
On lau, 2006-12-23 at 00:12 +0100, Alexis Paul Bertolini wrote:

> I set up a DB with default values and it now uses the SQL_ASCII 
> character set (as per "show client_encoding;").
> 
> I have copied in quite a lot of data from various Access databases but 
> only now have I realized that all accented vowels show up differently 
> from what I expected (I dare not cite some examples a they would 
> doubtlessly show up wrong in the mail).
> 
> The contents are text written in Italian, so it's just the 5 vowels with 
> an acute or grave accent. The user base is all Italian, so a quick and 
> dirty trick is perfectly viable.
> 
> Any chance of running some smart UPDATE queries to put things right? Or 
> elaborating on the fields whilst performing a SELECT query?

depends on whether all imports have been in the same encoding 
or not. SQL_ASCII basically accepts and stores the characters
without interpretation, so if all imorts were done with one
client_encoding, you should be able to read the values again
using the same encoding.

are all the instances of these 5 characters the same everywhere?
in that case there is a good chance that you can fix the values
with UPDATES

when you say 
'all accented vowels show up differently from what I expected'
do you mean in psql or some other tool?
do these show as 1 or 2 characters?

gnari




pgsql-sql by date:

Previous
From: Alexis Paul Bertolini
Date:
Subject: Changing character set when the damage is done
Next
From: Alexis Paul Bertolini
Date:
Subject: Re: Changing character set when the damage is done