From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joel Fradkin <jfradkin@wazagua.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: encoding using the odbc driver
Date: Fri, 18 Feb 2005 14:40:11 -0500
Message-ID: <20377.1108755611@sss.pgh.pa.us> (raw)
In-Reply-To: <000001c515e7$393aca30$797ba8c0@jfradkin>
References: <000001c515e7$393aca30$797ba8c0@jfradkin>
"Joel Fradkin" <jfradkin@wazagua.com> writes:
> I changed my encoding from SQL_ASCII to UNICODE.
> I believe the Unicode is supposed to support more languages?
I think you're missing the point. The SQL_ASCII setting isn't an
encoding, really; it's a declaration of ignorance. In this setting
the server will just store and regurgitate whatever character strings
you send it. This will work fine, more or less, if all your clients
use exactly the same encoding and you don't care about functions like
upper()/lower().
When you use UNICODE (or any other setting) then the server tries to
enforce that what's stored in the database is actually valid data per
that encoding. It will also provide encoding conversion for clients
who select a different specific client_encoding. But a client that
sets client_encoding = SQL_ASCII defeats the conversion and will see
whatever's stored in the database.
If you flip between SQL_ASCII and other settings, on either end, without
clearly understanding what's happening, you're likely to get very
confused.
regards, tom lane
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-odbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, jfradkin@wazagua.com
Subject: Re: encoding using the odbc driver
In-Reply-To: <20377.1108755611@sss.pgh.pa.us>
References: <000001c515e7$393aca30$797ba8c0@jfradkin> <20377.1108755611@sss.pgh.pa.us>
* 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