X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0418856904 for ; Mon, 21 Mar 2005 20:56:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61153-03 for ; Mon, 21 Mar 2005 20:56:55 +0000 (GMT) Received: from mail2.bluewin.ch (mail2.bluewin.ch [195.186.4.73]) by svr1.postgresql.org (Postfix) with ESMTP id 0F28B568F0 for ; Mon, 21 Mar 2005 20:56:54 +0000 (GMT) Received: from server.ptools (83.78.158.137) by mail2.bluewin.ch (Bluewin 7.0.043) id 423AEC4700047775 for pgsql-admin@postgresql.org; Mon, 21 Mar 2005 20:56:54 +0000 From: Ivo Rossacher Organization: PTools To: pgsql-admin@postgresql.org Subject: Re: submit data from php: error with special character in the posted text Date: Mon, 21 Mar 2005 21:56:54 +0100 User-Agent: KMail/1.7.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200503212156.54363.rossacher@bluewin.ch> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/334 X-Sequence-Number: 16832 The encoding of the database and the client are not compatible. First of al= l=20 you need to select a database encoding which supports all the characters yo= u=20 require (for example: createdb -EUNICODE testdb). I would recommend unicode= =20 because it can store all possible characters and can be converted in any=20 client encoding by the server. If your client does not support the utf8 encoding (this is the internal=20 representation of unicode in the database) you can specify the correct=20 encoding for the client by a sql statement (for example: SET=20 client_encoding=3DLATIN1;). show client_encoding will display the current=20 settings. The server will convert then all characters to and from this=20 encoding for this client. This conversion will increase the load on the=20 server side. So for high trafic sites it might be an issue to consider. Best regards Ivo Am Donnerstag, 17. M=C3=A4rz 2005 15:33 schrieb Luciano Naldesi: > I am using an open source sw for a test forum, but if I insert in my > message some special character like =C3=A0,=C3=A8,=C3=AC ... when I submi= t the topic I get > the following error message: > Error in posting > DEBUG MODE > UPDATE elca2Forum_posts_text SET post_text =3D 'la citt=C3=A0', bbcode_ui= d =3D > '04e1371840', post_subject =3D 'prova accentate' WHERE post_id =3D 14 > Line : 282 > File : functions_post.php > > The message are inserted/updated in a posgresql db. > Any suggestion? > thanks luciano