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

OutputStreamWriter method throws wrong exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.1.6
    • core-libs
    • generic
    • generic

      [Note: 3-part bug report, only second part is relevant - norbert@Eng 1999-07-23]

      The Java converters as of JDK 1.1.6 don't accept MIME-preferred names for all the character encodings handled. Without this support, each application using them must have a table to convert from standard names to Java-specific names. This seems inefficient, especially since Java already has such a table in sun.io.CharacterEncoding.class.

      In OutputStreamWriter, one of the methods doc says it throws UnsupportedEncodingException but it actually throws an IllegalArgumentException.

      Also, looking into the source of sun.io.CharacterEncoding.class, one entry is suspect:

              aliasTable.put("csISOLatin1", "ISO8859_1");

      Since the key values are converted to lowercase before table lookup, it would seem that "csISOLatin1" would never match an incoming charset name. I haven't tested this though.

      Sorry about the Release listed, but I wasn't sure how the listed releases related to this problem.

            nsanjeevsunw Naveen Sanjeeva (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: