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

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