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 09:57:34 -0700
Message-ID: <20061224165734.GA43931@winnie.fuhr.org> (raw)
In-Reply-To: <458EA551.3090008@computer.org>
References: <458C6650.80105@computer.org>
<1166831523.6369.308.camel@localhost.localdomain>
<458EA551.3090008@computer.org>
On Sun, Dec 24, 2006 at 05:05:37PM +0100, Alexis Paul Bertolini wrote:
> They show up in PHP, PgAdminIII and psql. All the same. A lowercase e
> with a grave accent appears as a capital A with the cedilla, followed by
> an umlaut (just the umlaut, on its own). So to answer your question,
> they are two characters.
Are you sure that's not a tilde (a wavy line above the A) instead
of a cedilla (a hook below the A)? The UTF-8 encoding for lowercase e
with grave is 0xc3 0xa8, which in ISO-8859-1 (LATIN1) or Windows-1252
is uppercase A with tilde followed by a diaeresis (an umlaut on its
own). Does the data appear correctly if you do either of the following?
SELECT convert(colname, 'utf8', 'latin1') FROM tablename;
SELECT convert(colname, 'utf8', 'win1252') FROM tablename;
If you use characters like "smart quotes" or the Euro sign then
you'll probably need to use win1252 instead of latin1. Does the
following show a Euro sign or does it show blank?
SELECT convert('\342\202\254', 'utf8', 'win1252');
--
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: <20061224165734.GA43931@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