Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C8D799FA4B2 for ; Fri, 22 Dec 2006 19:49:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 54387-08 for ; Fri, 22 Dec 2006 19:49:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mx3.ipf.is (man.ipf.is [85.197.192.163]) by postgresql.org (Postfix) with ESMTP id B601D9FA48A for ; Fri, 22 Dec 2006 19:49:41 -0400 (AST) Received: (qmail 15317 invoked by uid 1010); 22 Dec 2006 23:42:25 +0000 Received: from 88.149.106.19 by man (envelope-from , uid 1008) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.4/1639. spamassassin: 3.1.4. perlscan: 1.25-st-qms. Clear:RC:1(88.149.106.19):SA:0(-1.3/4.5):. Processed in 3.580131 secs); 22 Dec 2006 23:42:25 -0000 X-Antivirus-HIVE-Mail-From: gnari@hive.is via man X-Antivirus-HIVE: 1.25-st-qms (Clear:RC:1(88.149.106.19):SA:0(-1.3/4.5):. Processed in 3.580131 secs Process 15300) Received: from dsl-149-106-19.hive.is (HELO ?192.168.1.33?) (88.149.106.19) by mx3.ipf.is with SMTP; 22 Dec 2006 23:42:21 +0000 Subject: Re: Changing character set when the damage is done From: Ragnar To: Alexis Paul Bertolini Cc: pgsql-sql@postgresql.org In-Reply-To: <458C6650.80105@computer.org> References: <458C6650.80105@computer.org> Content-Type: text/plain Date: Fri, 22 Dec 2006 23:52:03 +0000 Message-Id: <1166831523.6369.308.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/164 X-Sequence-Number: 27120 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