Re: Ongoing encoding issues

From: Date: Tue, 30 Jan 2007 01:57:33 +0000
Subject: Re: Ongoing encoding issues
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-247996@lists.php.net to get a copy of this message
On Fri, January 26, 2007 3:33 am, Dave Goodchild wrote: > 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. Send the charset in your headers *AND* set it in a META tag. Firefox trusts the headers. IE trusts the META tag. If the user insists on viewing your UTF-8 document with Latin-1 after that, then they probably had to work pretty hard at it, and you should just leave them alone with the bed they have made. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#247996) next »