Re: psql encoding problem - Mailing list pgsql-sql

From Ragnar Hafstað
Subject Re: psql encoding problem
Date
Msg-id 1109750238.16690.101.camel@localhost.localdomain
Whole thread Raw
In response to psql encoding problem  (T E Schmitz <mailreg@numerixtechnology.de>)
Responses Re: psql encoding problem  (T E Schmitz <mailreg@numerixtechnology.de>)
List 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




pgsql-sql by date:

Previous
From: "Greg Patnude"
Date:
Subject: Re: table constraints
Next
From: Michael Fuhr
Date:
Subject: Re: Postgres performance