From: Michael Fuhr <mike@fuhr.org>
To: Alexis Paul Bertolini <bertolini@computer.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Changing character set when the damage is done
Date: Sun, 24 Dec 2006 12:12:51 -0700
Message-ID: <20061224191251.GA46309@winnie.fuhr.org> (raw)
In-Reply-To: <458EBC64.5040808@computer.org>
References: <458C6650.80105@computer.org>
<1166831523.6369.308.camel@localhost.localdomain>
<458EA551.3090008@computer.org>
<20061224165734.GA43931@winnie.fuhr.org>
<458EBC64.5040808@computer.org>
On Sun, Dec 24, 2006 at 06:44:04PM +0100, Alexis Paul Bertolini wrote:
> >SELECT convert(colname, 'utf8', 'latin1') FROM tablename;
>
> Yep, I meant the A with the tilde (the word cedilla sounded Spanish...
> lol). Thanks, the "convert" function does the trick for me.
If possible consider recreating the database with an encoding other
than SQL_ASCII (e.g., LATIN1 or UTF8). If you do that, and if you
set client_encoding appropriately when inserting and selecting data,
then the database will convert the data automatically.
> Using win1252 I get a "invalid destination encoding" error, but no
> problem since I know for sure there aren't any euro signs.
Versions 8.1 and later support win1252 so I'd guess you're using
8.0 or earlier. Consider upgrading to 8.1 or 8.2 for numerous
improvements over earlier releases.
http://www.postgresql.org/docs/8.1/interactive/release-8-1.htmlhttp://www.postgresql.org/docs/8.2/interactive/release-8-2.html
--
Michael Fuhr
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-sql@postgresql.org
Cc: mike@fuhr.org, bertolini@computer.org
Subject: Re: Changing character set when the damage is done
In-Reply-To: <20061224191251.GA46309@winnie.fuhr.org>
* 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