Question about encoding

From: Denis BUCHER <dbucherml(at)hsolutions(dot)ch>
To: pgsql-sql(at)postgresql(dot)org
Subject: Question about encoding
Date: 2009-08-24 16:42:45
Message-ID: 4A92C305.2020303@hsolutions.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2009-08-24 22:42:25 Re: Question about encoding
Previous Message Jasen Betts 2009-08-22 11:45:28 Re: multiple substitution in a single replace call?