Re: PHP page source charset

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

 



On Tue, Dec 20, 2011 at 2:44 AM, Rick Dwyer <rpdwyer@xxxxxxxxxxxxx> wrote:
> When I set my page charset from iso-8859-1 to utf-8

Set it how?

http://www.w3.org/International/O-HTTP-charset.en.php

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

If you're looking up line references from a W3C validator in your PHP
code, then you're doing something very wrong and are perhaps
fundamentally confused. You need to distinguish between the PHP code
itself and the HTML that it generates and dispatches over the wire to
browsers and validators.

--
Benjamin Hawkes-Lewis

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