Hello,

I'm trying to upgrade a system that is currently running version 7.4.5
to the new 8.0.1

I create a backup, using pg_dump, and I expect it to work when
restoring it to 8.0.1.

However, when I run:

psql -U user -f backup.sql

Whenever there is a field value that contains characters with accents
(e.g., HTML á , which would be the Alt-160 character when
using the numeric keypad on Windows), I get an error about invalid
UNICODE characters in the COPY statements.

The error reads like:

psql:db_backup.sql:1548: ERROR: invalid byte sequence for encoding "UNICODE": 0xe12020
CONTEXT: COPY country, line 5, column namespanish: "Canad? "


(that ? should be an a with a ' on top -- in HTML, it would be the
á character)

I get this error with or without the line char_encoding="SQL_ASCII" at
the beginning of the pg_dump'ed file  (I noticed it and removed it to
see if that would fix the problem -- it didn't change the behaviour).

I know this feels like it could be the dumbest question ever asked
around here  :-)   But I can't figure out why it's happening and
how to fix it (I mean, it's a backup creaetd by pg_dump -- it should
be compatible with a psql restore, even if it is a different version).

Any ideas?

Thanks,

Carlos
--


---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend

Reply via email to