Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4436969

JEditorPane need to support "charset" attribute of HTML.

XMLWordPrintable


      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----------------------------------------------

            svioletsunw Scott Violet (Inactive)
            kkichisunw Kichi Kichi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: