pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedsubmit data from php: error with special character in the posted text
2+ messages / 2 participants
[nested] [flat]
* submit data from php: error with special character in the posted text
@ 2005-03-17 14:33 Luciano Naldesi <luciano.naldesi@bologna.enea.it>
0 siblings, 1 reply; 2+ messages in thread
From: Luciano Naldesi @ 2005-03-17 14:33 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: submit data from php: error with special character in the posted text
@ 2005-03-21 20:56 Ivo Rossacher <rossacher@bluewin.ch>
parent: Luciano Naldesi <luciano.naldesi@bologna.enea.it>
0 siblings, 0 replies; 2+ messages in thread
From: Ivo Rossacher @ 2005-03-21 20:56 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-03-21 20:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-17 14:33 submit data from php: error with special character in the posted text Luciano Naldesi <luciano.naldesi@bologna.enea.it>
2005-03-21 20:56 ` Ivo Rossacher <rossacher@bluewin.ch>
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