Hi Dave.
I don't think you are able to detect your users character encoding
with php only (at least not rock-solid). Just some days ago, there
was a discussion about that issue (at least concerning Safari) on the
Apple web dev mailing list.
Have a look at:
http://lists.apple.com/archives/web-dev/2007/Jan/msg00038.html
I could be possible to send some information about character encoding
along with the user submitted post data to your php script as well.
Depending on that encoding, do some string replace on your input data.
Have you provided a valid "charset" encoding in your html?
Maybe you could give us a link to a test page?
//frank
26 jan 2007 kl. 10.33 skrev Dave Goodchild:
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.
My question is, how do I overcome this. If I set my browser
encoding to
Latin-1 and enter the data I get that odd symbol, if I set it to
UTF-8 I get
clean data. Is there a way to sniff out what encoding the browser
is using
and then clean the data in any way.
I am googling for help also but you guys have been so helpful in
the past I
thought I'd try you also.
--
http://www.web-buddha.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php