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

(cs spec) Clarify definition of charset "historical name"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 6
    • core-libs

      There are cyclec references for historical encoding name.
      There is spec for OutputStreamWriter
      "public String getEncoding()
          Return the name of the character encoding being used by this stream.
          If the encoding has an historical name then that name is returned; otherwise the encoding's canonical name is returned.
          If this instance was created with the OutputStreamWriter(OutputStream, String) constructor then the returned name, being unique for the encoding, may differ from the name passed to the constructor. This method may return null if the stream has been closed."
      and spec for Charset
      " Some charsets have an historical name that is defined for compatibility with previous versions of the Java platform. A charset's historical name is either its canonical name or one of its aliases. The historical name is returned by the getEncoding() methods of the InputStreamReader and OutputStreamWriter classes."

      So historical name is undefined, any value is legal.

            sherman Xueming Shen
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: