From luciano.naldesi@bologna.enea.it Thu Mar 17 14:33:34 2005 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 DE1F856530 for ; Thu, 17 Mar 2005 14:33:34 +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 50864-10 for ; Thu, 17 Mar 2005 14:33:30 +0000 (GMT) Received: from bologna.enea.it (risc990.bologna.enea.it [192.107.61.1]) by svr1.postgresql.org (Postfix) with ESMTP id 62C8C56423 for ; Thu, 17 Mar 2005 14:33:27 +0000 (GMT) Received: from [192.168.33.60] (HELO notebookNALD) by bologna.enea.it (CommuniGate Pro SMTP 4.1.8) with ESMTP id 788621 for pgsql-admin@postgresql.org; Thu, 17 Mar 2005 15:26:31 +0100 From: "Luciano Naldesi" To: Subject: submit data from php: error with special character in the posted text Date: Thu, 17 Mar 2005 15:33:28 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C52B06.AAEEC4E0" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcUq/kj/N3tnFiVjRnqk9HX0xcMLtg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.19 tagged_above=0 required=5 tests=HTML_90_100, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200503/310 X-Sequence-Number: 16808 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C52B06.AAEEC4E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am using an open source sw for a test forum, but if I insert in my = message some special character like =E0,=E8,=EC ... when I submit the topic I = get the following error message:=20 Error in posting=20 DEBUG MODE=20 UPDATE elca2Forum_posts_text SET post_text =3D 'la citt=E0', bbcode_uid = =3D '04e1371840', post_subject =3D 'prova accentate' WHERE post_id =3D 14=20 Line : 282=20 File : functions_post.php=20 The message are inserted/updated in a posgresql db.=20 Any suggestion?=20 thanks luciano =20 ------=_NextPart_000_0000_01C52B06.AAEEC4E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I am using an open source sw for a test forum, but if I insert in my = message some special character like =E0,=E8,=EC ... when I submit the topic I get the following error message: =
Error in posting =
DEBUG MODE
UPDATE elca2Forum_posts_text SET = post_text =3D 'la citt=E0', bbcode_uid =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

 

------=_NextPart_000_0000_01C52B06.AAEEC4E0-- From rossacher@bluewin.ch Mon Mar 21 20:56:59 2005 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