- From: Tim Bagot <tsb-w3-html-0002@earth.li>
- Date: Fri, 26 Jan 2001 00:00:19 +0000 (UTC)
- To: <www-html@w3.org>
- cc: Ralph Corderoy <ralph@inputplus.demon.co.uk>
At 2001-01-25T22:44-0000, Ralph Corderoy wrote:- [...] > This is accepted by the other party but they say the code could only do > this if it knows the character set is ISO-8859-1 otherwise character > code 39 might be something different. This is incorrect. Numeric character references refer to ISO 10646 (which conveniently corresponds to ISO 8859-1 for the first 256 characters) whatever the document's character encoding, and have done since at least HTML 2.0. Some browsers were (are?) somewhat broken in this respect, but I would be very surprised indeed by the existence of one that broke on ASCII characters. > So, my question is it valid to always use ' in all the situations > where " is valid? If so, using ' won't break the code any > more than it might possibly already be broken. If not, then shouldn't > there be a &squot; character entity reference so code can work without > knowing the value of the character? Yes, it is valid everywhere " is. XML (and hence XHTML) predefine '. HTML, it seems, does not. Um, actually, looking at the XML recommendation, I now notice that it _appears_ to be the case that a character reference can terminate a literal while an entity reference cannot, so that a single quote in a single-quote-delimited attribute value would have to be escaped as ', and not '. Could someone more qualified to comment on this confirm or refute as appropriate? > BTW, I'm not a subscriber having found a pointer to the list but no > subscription details so please keep me CC'd on this. [For more information about W3C mailing lists and how to subscribe (and unsubscribe), see <http://www.w3.org/Mail/>.] Tim Bagot
Received on Thursday, 25 January 2001 19:00:26 UTC