United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4169960 : HTML Parser support for http-equiv on "Content-Language"

Details
Type:
Enhancement
Submit Date:
1998-08-28
Status:
Closed
Updated Date:
2001-11-13
Project Name:
JDK
Resolved Date:
2001-11-13
Component:
client-libs
OS:
generic
Sub-Component:
javax.swing
CPU:
generic
Priority:
P4
Resolution:
Duplicate
Affected Versions:
1.1.8,1.2.0
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
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)
======================================================================

                                    

Comments
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)
======================================================================
                                     
2004-06-11
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
                                     
2001-11-13



Hardware and Software, Engineered to Work Together