From: Chris <list@1006.org>
To: pgsql-admin@postgresql.org
Subject: Re: Mis-interpreted extended character
Date: Sat, 13 Dec 2003 16:38:46 +0100
Message-ID: <1071329925.2161.22.camel@linuxbox> (raw)
In-Reply-To: <3FDB2DBA.8000505@e-greek.net>
References: <3FDB2DBA.8000505@e-greek.net>
> Our database ( (PostgreSQL) 7.3.5 ) uses Unicode encoding:
> [...]
> For some reason, If I try to use an extended character (ASCII code >
> 127) in a string, I get this peculiar result:
> [...]
Probably your terminal is set to ISO-8859-1 ("latin 1") or something
like that, while your database is set to unicode as you showed.
Hence the mismatch. In unicode (for example UTF-8) non-US-ASCII
characters are encoded with two bytes (as opposed to one byte > 127
as happens with ISO-8859-1). Solution is to have everything agree on the
encoding. Terminal + DB or Web Browser + DB.
Btw. you _do_ actually have an influence on what encoding a web browser
uses by setting the "encoding" HTTP header.
According to my experience, if you have to deal with only western
european encodings, you're better off (still) with ISO-8859-1 (or
ISO-8859-15 to have the EUR symbol too).
Short answer: not PostgreSQL's fault.
Bye, Chris.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: list@1006.org
Subject: Re: Mis-interpreted extended character
In-Reply-To: <1071329925.2161.22.camel@linuxbox>
References: <3FDB2DBA.8000505@e-greek.net> <1071329925.2161.22.camel@linuxbox>
* 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