JDK-4436969 : JEditorPane need to support "charset" attribute of HTML.
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-04-10
  • Updated: 2001-04-10
  • Resolved: 2001-04-10
Related Reports
Duplicate :  
Relates :  
Description
JEditorPane need to support "charset" in the <META> tag of HTML.

Version 4.01 is supporting "charset" attribute which parse the encode 
like a description below.
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
                                                    ^^^^^^^^^^^^^^^^^^^^    
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 			  			   ^^^^^^^^^^^^^^^^^
<meta http-equiv="Content-Type" content="text/html; charset=ISO-2022-JP">
 			  			   ^^^^^^^^^^^^^^^^^ 

If open the html file which includes charset above with JEditorPane in Merlin,
JEditorPane ignore "charset" attribute due to HTML version 3.2. 

e.g.) If set "charset=shift_jis" in meta tag and html source character code is 
 encoded shift_jis, it does not display correctly on solaris eucjp locale due 
 to encode is not parsed with JEditorPane.
 

 
 =Referance=
---HTML
 http://www.w3.org/MarkUp/#previous
 
 http://www.w3.org/TR/html4/charset.html#doc-char-set


 
 -Paste from JeditorPane API-----------------------
 
 By default, the following types of content are known: 
 
 text/plain 
       Plain text, which is the default the type given isn't recognized. 
       The kit used in this case is an extension of DefaultEditorKit 
       that produces a wrapped plain text view. 
 text/html 
       HTML text. The kit used in this case is the class 
 javax.swing.text.html.HTMLEditorKit 
       which provides HTML 3.2 support. 
                      ^^^^^^^^^^^^^^^^
 text/rtf 
       RTF text. The kit used in this case is the class 
 javax.swing.text.rtf.RTFEditorKit 
       which provides a limited support of the Rich Text Format. 
 
 -End----------------------------------------------

Comments
EVALUATION As this is part of 4.0, I'm closing this as a duplicate of the 4.0 bug 4308782. scott.violet@eng 2001-04-10
10-04-2001