Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-7293

Unsupported character encodings in archived mail cause exceptions, should get read using ISO-8859-1 encoding

      See CSP-5793

      An email with an unsupported encoding, e.g. Content-Type: text/plain; charset=unknown-8bit will cause this exception:

      java.io.UnsupportedEncodingException: unknown-8bit
      at sun.io.Converters.getConverterClass(Converters.java:218)
      at sun.io.Converters.newConverter(Converters.java:251)
      at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:68)
      at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:224)
      at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:210)
      at

      sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:77)
      at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
      at com.sun.mail.handlers.text_plain.getContent(text_plain.java:64)
      at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:745)
      at javax.activation.DataHandler.getContent(DataHandler.java:501)
      at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1339)
      at com.atlassian.mail.MailUtils.getAttachments(MailUtils.java:147)

      We should catch this exception and read the bytes of the message with message.getInputStream() and convert it to a string using some default encoding (UTF8?)

            [CONFSERVER-7293] Unsupported character encodings in archived mail cause exceptions, should get read using ISO-8859-1 encoding

            No work has yet been logged on this issue.

              ckiehl Chris Kiehl
              tom@atlassian.com Tom Davies
              Affected customers:
              1 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: