W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

RE: JTidy praise and a question

From: Jelks Cabaniss <jelks@jelks.nu>
Date: Wed, 2 Feb 2000 12:06:43 -0500
To: <html-tidy@w3.org>
Message-ID: <NBBBICMNIPCICMKJECCBAEHGDFAA.jelks@jelks.nu>
> Would it make sense to add the following snippet of
> code to Lexer.fixXMLPI(Node root) after the call to
> addStringLiteral("xml version=...") ?
> 
>     if (this.configuration.CharEncoding == Configuration.UTF8)
>         addStringLiteral(" encoding=\"UTF8\"");
>     else if (this.configuration.CharEncoding == Configuration.LATIN1)
>         addStringLiteral(" encoding=\"ISO-8859-1\"");

For Latin 1.  But specifying utf-8 for XML is redundant:  

	<?xml version="1.0"?>

is the same thing as

	<?xml version="1.0" encoding="utf-8"?>

If you're using utf-8 encoding, you don't need to specify it.


/Jelks
Received on Wednesday, 2 February 2000 12:08:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT