Re: psql encoding problem

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: mailreg(at)numerixtechnology(dot)de
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: psql encoding problem
Date: 2005-03-02 07:57:18
Message-ID: 1109750238.16690.101.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 2005-02-28 at 20:48 +0000, T E Schmitz wrote:

> INSERT INTO item (name,retail_price) VALUES ('Cheese Soufflé',7.95,);
>
> (I presume you see the accented character in *Soufflé*)
>
> psql comes back with "invalid byte sequence for encoding "UNICODE": 0xe9"
> If I do this via DbVisualizer, the record is inserted fine.

might be the client encoding.

test=# CREATE DATABASE unitest with ENCODING='UNICODE';
CREATE DATABASE
test=# \connect unitest
You are now connected to database "unitest".
unitest=# create table a (n text);
CREATE TABLE
unitest=# insert into a values ('Cheese Soufflé is cool');
ERROR: invalid byte sequence for encoding "UNICODE": 0xe92069
unitest=# set client_encoding='LATIN1';
SET
unitest=# insert into a values ('Cheese Soufflé is cool');
INSERT 7533697 1
unitest=# select * from a;
n
------------------------
Cheese Soufflé is cool
(1 row)

unitest=#

gnari

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-03-02 08:17:24 Re: Postgres performance
Previous Message Josh Berkus 2005-03-02 04:47:08 Re: crosstab