JDK-4169960 : HTML Parser support for http-equiv on "Content-Language"
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.8,1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-08-28
  • Updated: 2001-11-13
  • Resolved: 2001-11-13
Related Reports
Duplicate :  
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.

	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)

WORK AROUND Name: krT82822 Date: 10/10/99 remove the lines. except frontpage keeps on putting them back in. So this is bad. As far as I can tell the html is still rendering ok. (Review ID: 96307) ======================================================================

EVALUATION Having meta http-equiv is not necessary because there is a known workaround. This bug is about having html 4.0 support for swing. There is rfe 4296022 for html4.0 support. Closing this rfe as duplicate. ###@###.### 2001-11-13