W3C home > Mailing lists > Public > www-international@w3.org > January to March 2005

Re: ASCII value upper 127 in <!-- Comment tag -->

From: Martin Duerst <duerst@w3.org>
Date: Thu, 27 Jan 2005 18:50:44 +0900
Message-Id: <6.0.0.20.2.20050127184125.07129d30@localhost>
To: Laurent_Martin@pch.gc.ca, www-international@w3.org

[First, sorry that my forwarding as a moderator using my Japanese
mailer distorted the French characters.]

At 04:54 05/01/27, Laurent_Martin@pch.gc.ca wrote:

>Hi!
>
>I'm builing an Intranet for my work and it's in french.
>
>I'm using Dreamweaver set in XHTML 1.0 Transitional for now (will switch 
>to Strict later) and I try to follow all the W3C XHTML 1.0 standards and 
>our Governement standard also. My encoding type is for now "iso-8859-1" 
>but I also plan to switch to "UTF-8" sometimes.
>
>Meanwhile, I'm restricted to lower 127 ASCII value within the HTML code 
>and use the &***; for equivalent.

Why that? Where does this restriction come from? HTML and XHTML
in iso-8859-1 or UTF-8 definitely allow to use the byte values
 >127 (in the case of UTF-8 of course only in certain combinations,
and in the case of iso-8859-1 only the values 160 and above).


>But within my personnal comment tag into the code, I wrote in french and 
>this contain upper 127 ASCII value like $Bq(Bor $B(B Now whenever I validate my 
>site with the tool embedded into Macromedia (Homesite), it generate an 
>error saying my code contain thoses caracters and should be changed for &***; .
>
>Now the question is: In XHTML 1.0 (Strict or Transitional) with 
>iso-8859-1, can we use upper 127 ASCII value caracters within a comment tag?
>
>Like "<-- Voil$B_(Bun commentaire qui g$BqOoS(Be des erreurs -->" would tell me " 
>$B_(B, "$Bq(B and "$Bo(B should not be used.

Yes, of course you can use these. In fact, what the tool is telling
you is totally wrong, because SGML, HTML, and XML do not allow the
use of entities (&eacute;) or numeric character references (&#170;)
in comments (same also in processing instructions, element names,
attribute names, and so on). While you can use the character sequence 
"&eacute;" in a comment, in that context, it does only represent
itself, and not an e-acute character. It's exactly the same as
if you wrote @eacute;, which also does not have any special meaning.

As I'm not familliar with Macromedia Homesite, I don't know
where the problem is exactly, and whether there is a workaround.
You should try to validate your document with http://validator.w3.org,
and see what you get.

Regards,   Martin.

>Thanks a lot
>
>Laurent Martin
>IT Specialist / Webmaster
>Canadian Heritage, Quebec Region
>laurent_martin@pch.gc.ca
Received on Thursday, 27 January 2005 23:53:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:17:04 GMT