Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 7FD6263374B for ; Tue, 23 Mar 2010 05:10:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33145-01 for ; Tue, 23 Mar 2010 08:10:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hermes.vectorsf.com (firewall.vectorsf.com [62.82.80.62]) by mail.postgresql.org (Postfix) with ESMTP id D24886321C4 for ; Tue, 23 Mar 2010 05:10:24 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.vectorsf.com (Postfix) with ESMTP id 6E0EF11C0015; Tue, 23 Mar 2010 09:10:21 +0100 (CET) X-Virus-Scanned: amavisd-new at hermes.vectorsf.com Received: from hermes.vectorsf.com ([127.0.0.1]) by localhost (hermes.vectorsf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id siQ1WcFf5oat; Tue, 23 Mar 2010 09:10:15 +0100 (CET) Received: from [10.70.4.200] (unknown [10.70.4.200]) (Authenticated sender: imartinez) by hermes.vectorsf.com (Postfix) with ESMTP id B08D911C003F; Tue, 23 Mar 2010 09:10:15 +0100 (CET) Subject: Re: Bad encoded chars in being inserted into database From: =?ISO-8859-1?Q?I=F1igo?= Martinez Lasala To: Gabriele Bartolini Cc: pgsql-admin@postgresql.org In-Reply-To: <4BA7E632.1080608@2ndQuadrant.it> References: <050f01cac99c$7dafe100$790fa300$@com> <4BA7E632.1080608@2ndQuadrant.it> Content-Type: multipart/alternative; boundary="=-uTaQwnr0mq6cgvQoRQnS" Date: Tue, 23 Mar 2010 09:10:16 +0100 Message-ID: <1269331816.8928.10.camel@deimos> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.08 tagged_above=-10 required=5 tests=AWL=0.518, BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/161 X-Sequence-Number: 33960 --=-uTaQwnr0mq6cgvQoRQnS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Postgresql version: 8.1.13 (8.1.13-0etch1) database encoding: UTF-8. client_encoding: default, that is, it's no set at php level. However, pg_client_encoding returns "UTF8" as client encoding. Thank you, Gabriele. -----Original Message----- From: Gabriele Bartolini To: Iñigo Martinez Lasala Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Bad encoded chars in being inserted into database Date: Mon, 22 Mar 2010 22:50:42 +0100 Hi, > > I agree with this postgres policy, but what I don’t is that you can > INSERT them via application. That is, no bad characters should be > inserted into database. The check should be made for both import and > insert procedures so no bad chars would appear into database. > Could you please tell us which PostgreSQL version you are currently using? Also it would be useful to know: * which is your database encoding? * which is the client_encoding setting you are using? In general, what you are saying suggests me that you are using the SQL_ASCII encoding at some stage in your session (either on the server side or the client side). However, before I go on, please answer the above questions. Thanks, Gabriele --=-uTaQwnr0mq6cgvQoRQnS Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit Postgresql version: 8.1.13 (8.1.13-0etch1)
database encoding: UTF-8.
client_encoding: default, that is, it's no set at php level.

However, pg_client_encoding returns "UTF8" as client encoding.

Thank you, Gabriele.

-----Original Message-----
From: Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>
To: Iñigo Martinez Lasala <imartinez@vectorsf.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Bad encoded chars in being inserted into database
Date: Mon, 22 Mar 2010 22:50:42 +0100

Hi,
>
> I agree with this postgres policy, but what I don’t is that you can 
> INSERT them via application. That is, no bad characters should be 
> inserted into database. The check should be made for both import and 
> insert procedures so no bad chars would appear into database.
>
Could you please tell us which PostgreSQL version you are currently 
using? Also it would be useful to know:

* which is your database encoding?
* which is the client_encoding setting you are using?

In general, what you are saying suggests me that you are using the 
SQL_ASCII encoding at some stage in your session (either on the server 
side or the client side).

However, before I go on, please answer the above questions.

Thanks,
Gabriele


--=-uTaQwnr0mq6cgvQoRQnS--