Client Encoding and Latin characters

From: Lee Hachadoorian <lee(dot)hachadoorian(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Client Encoding and Latin characters
Date: 2009-11-24 16:39:11
Message-ID: 5ab13580911240839s5770e569s34d2c12093b577f0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My database is encoded UTF8. I recently was uploading (via COPY) some
census data which included place names with ñ, é, ü, and other such
characters. The upload choked on the Latin characters. Following the
docs, I was able to fix this with:

SET CLIENT_ENCODING TO 'LATIN1';
COPY table FROM 'filename';

After which I

SET CLIENT_ENCODING TO 'UTF8';

I typically use COPY FROM to bulk load data. My question is, is there
any disadvantage to setting the default client_encoding as LATIN1? I
expect to never be dealing with Asian languages, or most of the other
LATINx languages. If I ever try to COPY FROM data incompatible with
LATIN1, the command will just choke, and I can pick an appropriate
encoding and try again, right?

Thanks,
--Lee

--
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-11-24 16:45:21 Re: Client Encoding and Latin characters
Previous Message Albe Laurenz 2009-11-24 16:26:06 Re: DBD::Pg 2.15.1 compilation failed