Re: Ongoing encoding issues

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

 



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?

-- 
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