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
Lee Hachadoorian lee.hachadoor...@gmail.com writes:
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:
Uh, no. You can pretty much assume that LATIN1 will take any random
byte string; likewise for any other single-byte encoding. UTF8 as a
default is a bit safer because it's significantly more likely that it
will be able to detect non-UTF8 input.
regards, tom lane