Re: Strange UTF-8 behaviour - Mailing list pgsql-general

From Matteo Beccati
Subject Re: Strange UTF-8 behaviour
Date
Msg-id 4149FFD3.7090709@beccati.com
Whole thread Raw
In response to Re: Strange UTF-8 behaviour  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Strange UTF-8 behaviour  (Matteo Beccati <php@beccati.com>)
List pgsql-general
Hi Alvaro,

> FWIW, I can't reproduce this using 7.3.6.  Is there anything special
> about your 'e' character, or it's a plain 'e'?

Maybe you didn't get the email correctly. It was an e with grave
accent:, just like this:

è (UTF-8 encoded)

I just checked on PG 7.4.3 / NetBSD, with this results:

egrave=# CREATE TABLE test (data varchar(5));
CREATE
egrave=# show server_encoding ;
  client_encoding
-----------------
  UNICODE
(1 row)

egrave=# show client_encoding ; -- don't know why it is set to unicode
  client_encoding
-----------------
  UNICODE
(1 row)

egrave=# INSERT INTO test VALUES ('1234è');
egrave'# '\r
Query buffer reset (cleared).
egrave=# set client_encoding = 'ISO8859-1';
SET
egrave=# show client_encoding ;
  client_encoding
-----------------
  ISO8859-1
(1 row)

egrave=# INSERT INTO test VALUES ('1234è');
INSERT 25340 1
egrave=# SELECT * FROM test;
  data
------
  1234è
(1 row)


It seems all is working when client encoding is set correctly up. Try to
check you client and server encoding.

I've also double checked with:

egrave=# SET client_encoding = 'ISO8859-2';
SET
egrave=# SELECT * FROM test;
WARNING:  ignoring unconvertible UTF-8 character 0xc3a8
  data
------
  1234
(1 row)


Best regards
--
Matteo Beccati
http://phpadsnew.com/
http://phppgads.com/

pgsql-general by date:

Previous
From: Jerome Lyles
Date:
Subject: Re: Spacing in output
Next
From: Matteo Beccati
Date:
Subject: Re: Strange UTF-8 behaviour