Обсуждение: BUG #2360: Backup produces "ERROR: could not convert UTF8 character to ISO8859-1"

Поиск
Список
Период
Сортировка

BUG #2360: Backup produces "ERROR: could not convert UTF8 character to ISO8859-1"

От
"JP Glutting"
Дата:
The following bug has been logged online:

Bug reference:      2360
Logged by:          JP Glutting
Email address:      jpglutting@oqua.udl.es
PostgreSQL version: 8.1 (8.0)
Operating system:   Windows XP SP2
Description:        Backup produces "ERROR: could not convert UTF8 character
to ISO8859-1"
Details:

There seems to be a bug in version 8.1 that produces this error when doing a
pg_dump (or pg_dumpall) of a database with certain characters in it. I am
not sure exactly which characters they are, but they did not cause a problem
in Postgres 8.0, because some of the databases that I cannot backup were
backed up from 8.0 and restored into 8.1 (there are also problems with data
entered directly into Postgres 8.1).

I have a test database with a single table in it as a test case. I can
backup this table (or database) from Postgres 8.0, and restore it into both
8.0 and 8.1. I can also back it up again from 8.0, but it will not backup
(or dump) from 8.1 (either from the command line or pgadmin3)

I can provide the test datbase (or table) in any format you would like. I
have yet to test this on Linux, but I will have a test box with Ubuntu 5.10
and Postgres 8.1 available soon.

Re: BUG #2360: Backup produces "ERROR: could not convert UTF8 character to ISO8859-1"

От
tomas@tuxteam.de (Tomas Zerolo)
Дата:
On Mon, Mar 27, 2006 at 10:20:23AM +0000, JP Glutting wrote:
>=20
> The following bug has been logged online:
>=20
> Bug reference:      2360
> Logged by:          JP Glutting
> Email address:      jpglutting@oqua.udl.es
> PostgreSQL version: 8.1 (8.0)
> Operating system:   Windows XP SP2
> Description:        Backup produces "ERROR: could not convert UTF8 charac=
ter
> to ISO8859-1"
> Details:=20
>=20
> There seems to be a bug in version 8.1 that produces this error when doin=
g a
> pg_dump (or pg_dumpall) of a database with certain characters in it. I am
> not sure exactly which characters they are, but they did not cause a prob=
lem
> in Postgres 8.0, because some of the databases that I cannot backup were
> backed up from 8.0 and restored into 8.1 (there are also problems with da=
ta
> entered directly into Postgres 8.1).=20

Could it be that the client encoding changed from restore to backup?
Which encoding is the backend using? Which one the client?

(to see the backend encoding (it's fixed once you build the DB), just
psql the database and issue \l (list databases). To show/set the client
encoding do "SHOW client_encoding" or "SET client_encoding TO ..."
Or just use \encoding if you are using psql).

PostgreSQL tries to translate back and forth between encodings, but
alas, you can't translate every (utf8 encoded) UNICODE to latin1, for
example...

Regards
-- tom=C3=A1s