Re: Ongoing encoding issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# neuhauser@xxxxxxxxxx / 2007-01-26 21:09:34 +0000:
> # buddhamagnet@xxxxxxxxx / 2007-01-26 09:33:13 +0000:
> > Hi all, I posted a question a couple of days ago regarding a web app I have
> > wherein users are able to indicated prices and concessions via a text field,
> > and the resulting encoding issues I have experienced, the main one being
> > seeing the pound sign as Â? if viewing the results in a browser with the
> > encoding set to Latin-1.
> 
> Your PostgreSQL database uses some encoding,

Dave pointed out to me that he's using MySQL.  That means the
configuration mechanisms for the database will be different, but the
principal issue remains the same.

> your PHP script runs under some locale (incl. character encoding), and
> the browser sent the text in some encoding.  PostgreSQL assumes the
> input data is in the charset the database uses (unless you have
> client_encoding set in postgresql.conf, or PGCLIENTENCODING (IIRC) in
> the environment, or have set client_encoding using the SET command).
> 
> It's important that you correctly identify encoding of the inserted data
> to PostgreSQL or convert it to the encoding it expects beforehand.  You
> can use iconv or recode functions in PHP, I'd probably have a look if
> there's an apache input filter for character encoding conversions.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux