Hi. In short I am trying to validate my site. It is a long process. I am going from transitional to strict. I have a code that $summary to htmlentities, preg_replaces sets of two spaces into and then I use html_entity_decode to change it back.
The problem is that the w3 validator won't validate it because of the PHP.net has this note about using that I don't quite understandhtml_entity_decode()' ' entity is not ASCII code 32 (which is stripped by trim()) but ASCII code 160 (0xa0) in the default ISO 8859-1 characterset.
The failure statement readsAny ideas on what I can do? I would prefer to keep the if I can, so that the browser doesn't condense sets of spaces when I don't want it to.Sorry, I am unable to validate this document because on line 1 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 "\xA0" does not map to Unicode
I am usingEDIT: Sorry, I got it. Instead of using I am going to use & #160; (without the space between the & and #. The forum won't display the pattern I see.)  problem solved. Now I am off to revalidating. This will certainly take a while.Code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >



Reply With Quote

Bookmarks