[jdom-interest] Todo list [eg]
jhunter at acm.org
Mon Apr 30 22:42:00 PDT 2001
"Rosen, Alex" wrote:
> > Older JVMs don't accept UTF-8 as a name. It's a case where
> > Java doesn't recognize the XML-style name.
> Doing some quick testing with JDK 1.1, it looks like it doesn't accept "UTF-8",
> only "UTF8". It doesn't support UTF-16, no matter how it's written. (Neither
> does JDK 1.2, but 1.3 does.) JDK 1.1 supports the standard names for the other
> major encodings just fine.
> In order to support UTF-8 on JDK 1.1, and to ensure that all XML documents are
> output with valid encoding values, I propose that the special-casing logic be
> moved from printDeclaration() to makeWriter(). I.E. remove the the code in
> printDeclaration() to accept "UTF8", and instead change makeWriter() to
> translate "UTF-8" to "UTF8". And initialize the "encoding" member variable to
> "UTF-8". Then, we can state that the interface to XMLOutputter can use only
> XML-standard encoding names. (With the existing logic, that wouldn't be true
> for JDK 1.1.)
> What do you think?
Sounds good. Send in a patch? Please update the Javadocs along with
the code to explain your logic. :-)
More information about the jdom-interest