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: Fri, 24 Mar 2000 11:45:42 -0600
To: <html-tidy@w3.org>
Message-ID: <OFB59A90AF.70F1DA2F-ON86256879.005E3B9B@rfdinc.com>

> 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 Friday, 24 March 2000 13:14:07 GMT

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