Encoding-related errors when moving from 7.3 to 8.0.1

From: Carlos Moreno <moreno(at)mochima(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Encoding-related errors when moving from 7.3 to 8.0.1
Date: 2005-03-19 22:25:46
Message-ID: 423CA6EA.7030909@mochima.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 &aacute; , 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
&aacute; 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
--

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-03-19 22:46:17 Re: Query performance problem
Previous Message Paul Tillotson 2005-03-19 21:46:21 Re: Query performance problem