From: Ivo Rossacher <rossacher@bluewin.ch>
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
Message-ID: <200503212156.54363.rossacher@bluewin.ch> (raw)
In-Reply-To: <auto-000000788621@bologna.enea.it>
References: <auto-000000788621@bologna.enea.it>
The encoding of the database and the client are not compatible. First of all
you need to select a database encoding which supports all the characters you
require (for example: createdb -EUNICODE testdb). I would recommend unicode
because it can store all possible characters and can be converted in any
client encoding by the server.
If your client does not support the utf8 encoding (this is the internal
representation of unicode in the database) you can specify the correct
encoding for the client by a sql statement (for example: SET
client_encoding=LATIN1;). show client_encoding will display the current
settings. The server will convert then all characters to and from this
encoding for this client. This conversion will increase the load on the
server side. So for high trafic sites it might be an issue to consider.
Best regards
Ivo
Am Donnerstag, 17. März 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 à,è,ì ... when I submit the topic I get
> the following error message:
> Error in posting
> DEBUG MODE
> UPDATE elca2Forum_posts_text SET post_text = 'la città', bbcode_uid =
> '04e1371840', post_subject = 'prova accentate' WHERE post_id = 14
> Line : 282
> File : functions_post.php
>
> The message are inserted/updated in a posgresql db.
> Any suggestion?
> thanks luciano
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: rossacher@bluewin.ch
Subject: Re: submit data from php: error with special character in the posted text
In-Reply-To: <200503212156.54363.rossacher@bluewin.ch>
References: <auto-000000788621@bologna.enea.it> <200503212156.54363.rossacher@bluewin.ch>
* 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