Re: PHP page source charset

From: Date: Tue, 20 Dec 2011 18:32:14 +0000
Subject: Re: PHP page source charset
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-316075@lists.php.net to get a copy of this message
On 12/19/2011 6:44 PM, Rick Dwyer wrote: > Hello all. > > When I set my page charset from iso-8859-1 to utf-8, when I run it through the > W3C validator, the validator returns an error that it can't validate the page > because of an illegal character not covered by UTF-8. > > > "Sorry, I am unable to validate this document because on line 199 it contained > one or more bytes that I cannot interpret as utf-8(in other words, the bytes > found are not valid values in the specified Character Encoding). Please check > both the content of the file and the character encoding indication. > The error was: utf8 "\x99" does not map to Unicode" > > Line 199 is a line with my open PHP declaration: > "<?php" > > Not sure why W3C is having a hard time with this. Any ideas? > > --Rick > > You need to look at the output of your script, not the source for your script. The validation only happens after PHP has executed & processed the php script and sent the output to the browser. It is the source in the browser that the validation script sees. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/

« previous php.general (#316075) next »