The HTML parser needs to provide support for setting the content language in the <META> tag within a document. Given the current HTML 4.0 lang syntax it is necessary for an exception similar to CharSetNameException to be thrown so that a doucment can be reparsed using a new Locale.
Currently the workaround is to set the lang in the <HTML> tag. This support isn't necessary until HTML 4.0 is supported.
Name: krT82822 Date: 10/10/99
Either of the following lines in an html file,
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
causes the following error to happen.
java.util.EmptyStackException
at java.util.Stack.peek(Compiled Code)
at javax.swing.text.DefaultStyledDocument$ElementBuffer.insertElement(Compiled Code)
at javax.swing.text.DefaultStyledDocument$ElementBuffer.insertUpdate(Compiled Code)
at javax.swing.text.DefaultStyledDocument$ElementBuffer.insert(DefaultStyledDocument.java:1211)
at javax.swing.text.DefaultStyledDocument.insert(Compiled Code)
at javax.swing.text.html.HTMLDocument.insert(HTMLDocument.java:216)
at javax.swing.text.html.HTMLDocument$HTMLReader.flushBuffer(HTMLDocument.java:2678)
at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:1631)
at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:244)
at javax.swing.JEditorPane.read(JEditorPane.java:404)
at javax.swing.JEditorPane.read(JEditorPane.java:422)
at javax.swing.JEditorPane$PageLoader.run(JEditorPane.java:450)
--------------
10/10/99 eval1127@eng -- bug #'s 4169960 (RFE), 4191647 (fixed for 1.2.2) seem to apply.
(Review ID: 96307)
======================================================================