Обсуждение: yum update now gives me UNICODE errors

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

yum update now gives me UNICODE errors

От
Gary Stainburn
Дата:
Hi folks.

Yesterday I ran a 'yum update' which included upgrading to 8.0.8.

Now when I run a SQL script I get the following errors:

insert into orders (or_supp, or_date, or_received, or_no, or_state,
or_comments) values     -- 74
    (4, '2004-02-13', '2004-02-13', 121604,'I','Sony Vaio FR395EP @ £789\nCarry
Case');
ERROR:  invalid byte sequence for encoding "UNICODE": 0xa3

The problem is the £ (pound sterling) sign, but I never had any problems prior
to the update.

Can anyone tell me what has changed, and how I can change it back.

Thanks
--
Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

Re: yum update now gives me UNICODE errors

От
Tom Lane
Дата:
Gary Stainburn <gary.stainburn@ringways.co.uk> writes:
> ERROR:  invalid byte sequence for encoding "UNICODE": 0xa3

> The problem is the � (pound sterling) sign, but I never had any problems prior
> to the update.

Postgres didn't use to be quite as picky about the encoding as it is
now.  What you are sending it is not UTF-8, and you can no longer
get away with pretending that it is.  It looks like you're probably
using Latin1 (ISO 8859-1) or something related.  Assuming that that's
what's really in your database, what I'd do is
    - dump the database
    - edit the SET client_encoding command at the head of the dump
      file to say the correct encoding
    - initdb in the correct locale (one using your encoding,
      not utf8)
    - reload data

            regards, tom lane