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

RFE: Add UTF-7 to encoding converters

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs



      Name: rf98795 Date: 01/11/2000



      Add UTF-7 to the standard set of supported encoding converters. This is useful
      when trying to pass Unicode data through transports that are only ASCII safe.

      ======================================================================

      Here is some additional evidence of why supporting this encoding within
      the J2SE core set of converters might need to be considered:
      Taken from RFE #4679523



      Name: bs11 Date: 05/03/2002


      FULL PRODUCT VERSION :
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
      Classic VM (build 1.3.0, J2RE 1.3.0 IBM build co130-20020124 (JIT enabled: jitc)
      )


      FULL OPERATING SYSTEM VERSION :
      The Operating System/2 Version is 4.50

      A DESCRIPTION OF THE PROBLEM :
      JavaMail should support all mail-specific charsets, such as
      "unicode-1-1-utf-7" and perhaps others.

      Hotmail.com, among others, frequently uses this encoding and
      when JavaMail encounters it it results in the specified
      error message (see below).

      I have attached a testcase mail for you to parse below.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. See testcase
      2.
      3.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.io.UnsupportedEncodingException: unicode-1-1-utf-7
      at sun.io.Converters.getConverterClass(Converters.java:97)
      at sun.io.Converters.newConverter(Converters.java:128)
      at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:71)
      at java.io.InputStreamReader.<init>(InputStreamReader.java:85)
      at com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
      at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
      at javax.activation.DataHandler.getContent(DataHandler.java:511)
      at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:531)

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Return-Path: <>
      Received: from hotmail.com (mc1-s11.law16.hotmail.com [65.54.236.60]) by
       HSE-QuebecCity-ppp3503426.sympatico.ca (Weasel v1.40) for
       <###@###.###>; 16 Apr 2002 22:17:09
      Received: from hotmail.com ([65.54.236.21]) by hotmail.com with Microsoft
      SMTPSVC(5.0.2195.4905);
      Tue, 16 Apr 2002 19:16:08 -0700
        From: ###@###.###
        To: ###@###.###
      Date: Tue, 16 Apr 2002 19:15:49 -0700
      MIME-Version: 1.0
      Content-Type: multipart/report; report-type=delivery-status;
      boundary="9B095B5ADSN=_01C1E58710E1D33C0000BFAChotmail.com"
      Message-ID: <###@###.###>
        Subject: Delivery Status Notification (Failure)
      Return-Path: <>
      X-OriginalArrivalTime: 17 Apr 2002 02:16:09.0046 (UTC) FILETIME=[D64F7F60:01C1E5B5]

      This is a MIME-formatted message.
      Portions of this message may be unreadable without a MIME-capable mail program.

      --9B095B5ADSN=_01C1E58710E1D33C0000BFAChotmail.com
      Content-Type: text/plain; charset=unicode-1-1-utf-7

      This is an automatically generated Delivery Status Notification.

      Delivery to the following recipients failed.

             ###@###.###

      --9B095B5ADSN=_01C1E58710E1D33C0000BFAChotmail.com--
      ---------- END SOURCE ----------
      (Review ID: 145766)
      ======================================================================


      ###@###.### 2002-05-03
      JavaMail depends on the charset support in the JDK, so support for this
      charset needs to be added to the JDK.

            sherman Xueming Shen
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: