From: Ragnar Hafstað <gnari@simnet.is>
To: mailreg@numerixtechnology.de
Cc: pgsql-sql@postgresql.org
Subject: Re: psql encoding problem
Date: Wed, 02 Mar 2005 07:57:18 +0000
Message-ID: <1109750238.16690.101.camel@localhost.localdomain> (raw)
In-Reply-To: <4223838A.7030904@numerixtechnology.de>
References: <4223838A.7030904@numerixtechnology.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gnari@simnet.is, mailreg@numerixtechnology.de
Subject: Re: psql encoding problem
In-Reply-To: <1109750238.16690.101.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox