Encoding-related errors when moving from 7.3 to 8.0.1 - Mailing list pgsql-general

From Carlos Moreno
Subject Encoding-related errors when moving from 7.3 to 8.0.1
Date
Msg-id 423CA6EA.7030909@mochima.com
Whole thread Raw
Responses Re: Encoding-related errors when moving from 7.3 to 8.0.1
List pgsql-general
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
--


pgsql-general by date:

Previous
From: Paul Tillotson
Date:
Subject: Re: Query performance problem
Next
From: Greg Stark
Date:
Subject: Re: Query performance problem