Question about encoding - Mailing list pgsql-sql

From Denis BUCHER
Subject Question about encoding
Date
Msg-id 4A92C305.2020303@hsolutions.ch
Whole thread Raw
Responses Re: Question about encoding
List pgsql-sql
Hello,

I'm sure you already replied tons of questions like this, but I don't
understand something.

This is the situation :
* I have COPY commands from a dump, encoded as UTF8 (special characters
are encoded as 2-bytes).
* My file contains SET client_encoding = 'UTF8';
* But when I do psql <myfile.sql I get an error for 40 characters long
strings that have UTF8 characters : ERROR:  value too long for type
character varying(40)
* I think I understand why, psql -l says that my database is SQL_ASCII
* Postgresql 7.4

Question 1 :
Is it the expected behavior ? These characters have a SQL_ASCII
equivalent because I already have them stored in another table of the
same database

Question 2 :
If yes, then I suppose I should have the database as LATIN1 or UTF8.
Can I change/convert the encoding of the database ? Or at least of the
schema (which would be even better)

Thanks a lot for any help :-)))

Denis


pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: multiple substitution in a single replace call?
Next
From: Peter Eisentraut
Date:
Subject: Re: Question about encoding