Caracter é

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Caracter é

Nicolas Cornu

Hello,

I compiled Postgresql 8 on my server and installed it
I am trying to insert a string using php and PEAR::DB

The string contain: é and this cause
$db-query to fail with an Unkown error as error message.

If i insert the data using pgAdminIII the string is inserted into the
table.

I don't think it is Postgres related, do i need to ask to PEAR::DB team ?

Thanks in adavance,

CN

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly
Reply | Threaded
Open this post in threaded view
|

Re: [SQL] Caracter é

pfc-2

        Hello,

        This is probably a character encoding issue ; try issuing a SET  
client_encoding TO whatever encoding you're using ; it is possible that  
your connection through PHP defaults to SQL_ASCII in which "é" is illegal  
(mine did). Or, check your browser, form etc. encoding to make sure some  
Unicode doesn't get mixed up with some non-Unicode stuff.
        Note that I tried PEAR::DB and found it to be, literally, a piece of junk  
(sorry, no other words).


> I compiled Postgresql 8 on my server and installed it
> I am trying to insert a string using php and PEAR::DB
>
> The string contain: é and this cause
> $db-query to fail with an Unkown error as error message.
>
> If i insert the data using pgAdminIII the string is inserted into the  
> table.
>
> I don't think it is Postgres related, do i need to ask to PEAR::DB team ?
>
> Thanks in adavance,
>
> CN
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to [hidden email] so that your
>        message can get through to the mailing list cleanly
>



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: Caracter é

Frank Finner
In reply to this post by Nicolas Cornu
Hi,

what encoding do your webpages have, and what encoding does your database have? If both have the same encoding (eg both UTF8 or both Latin1), all should go well, otherwise you will have to adapt encodings before putting form data into the database (and vice versa), eg with utf_encode / utf_decode.

We had a similiar problem, since we encode both, webpages and database, as utf8, there is no longer such a problem. We use php 4.4.x, postgresql 8.0.3 and pear.

Regards, Frank.


On Sat, 06 Aug 2005 22:58:40 +0200 Nicolas Cornu <[hidden email]> thought long, then sat down and wrote:

>
> Hello,
>
> I compiled Postgresql 8 on my server and installed it
> I am trying to insert a string using php and PEAR::DB
>
> The string contain: é and this cause
> $db-query to fail with an Unkown error as error message.
>
> If i insert the data using pgAdminIII the string is inserted into the
> table.
>
> I don't think it is Postgres related, do i need to ask to PEAR::DB team ?
>
> Thanks in adavance,
>
> CN
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to [hidden email] so that your
>        message can get through to the mailing list cleanly

--
Frank Finner

Invenius - Lösungen mit Linux
Köpfchenstraße 36
57072 Siegen
Telefon: 0271 231 8606    Mail: [hidden email]
Telefax: 0271 231 8608    Web:  http://www.invenius.de
Key fingerprint = 90DF FF40 582E 6D6B BADF  6E6A A74E 67E4 E788 2651


attachment0 (196 bytes) Download Attachment