Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [angus-dev] Character set encoding error for processing attachment (UTF-ISO-8859-1)
  • From: Jason Mehrens <jason_mehrens@xxxxxxxxxxx>
  • Date: Wed, 5 Apr 2023 01:50:42 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2K37Ov3HSzj+Y5QpHfwc4J8nWtOEI3EKg5+5raQ44nA=; b=i/YYRVQb528t1pNEDFLCQ/aiI8LYMZrQiaDgpH793IYaM38yQPPGAJXmnAkLLDm2J44KrKLgiZv9kq+RbVwrnPfuRuFZBbd9UqVxgTuuASyp5dUwZytSJCj4qmxLvRoRHp6A4xMzaPe8Qcs6UEdjhIYY5Rtl9JgvZCXxTi4bmI5na2J3OGMlEL1VivL3bHgKEGVKyvd7t1V+8dSkPQgWsC5ab+tXOmo6wT41dBerVQiUv2jCUyOjn1PNBLTjROo2hJpncqMyGr6v233Ts6NjpF1ijupFJFuPvXkpTDbuHOhtfQt6qDh497+xeAx9PQsyuVz12yfjGx4eYiOC9zikfA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KNUQIBAAhHWWrYp8Wv2FWEYkBpVRldjZ9AZaebG8h4qdCWC5na8BW64bsJr4nX52kADEjLhA0FeLm46nu7VdxPyEyA9q25XKJ/BRRAp1gS1jLHPAkXJoudmp+5IoIgMRcBLGnA1AXOmG9rK3GlFeq8Gs1/qCLs1r+SDxTeUnmsoLdoA0rrJWTBpNQQCqXhSzDpCx7g2P/FIhtL4vFKsfS1nWrn24I1wUXAOG8GqZCcMkJEbIlyN5kSLWsMcqeOJhLwpt7QxzJNZvzxNQ3/LR2OPPCEN9aJAyD3/2mne9Lq4TGZidoq/qttTfFV4qvRGu1OBW1UjxrH3d0AdGimhk9Q==
  • Delivered-to: angus-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/angus-dev/>
  • List-help: <mailto:angus-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/angus-dev>, <mailto:angus-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/angus-dev>, <mailto:angus-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: Adlm/O+M9LtlxGq6RhW9lmQBopgi6QAYpQBs
  • Thread-topic: Character set encoding error for processing attachment (UTF-ISO-8859-1)

The Angus Mail FAQ has some details on this error.  See:  "Why do I get the UnsupportedEncodingException when I invoke getContent() on a bodypart that contains text data?" https://eclipse-ee4j.github.io/angus-mail/FAQ#getContent

Write a test case that just does Charset.forName("UTF-ISO-8859-1"); and you should see the same error with just using classes from the JDK itself.  What this means is that you are dealing with a mime message that placed an unknown character set in the content type.

In addition to the two solutions in the Angus Mail FAQ there is also a solution in https://stackoverflow.com/questions/40876598/is-there-a-way-to-add-aliases-for-javas-charset-names/40920421#40920421.

One of these 3 options should help you work through handling these types of messages.

Hope this helps,

Jason

________________________________________
From: angus-dev <angus-dev-bounces@xxxxxxxxxxx> on behalf of Yuchuan Tao <yuchuan.tao@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, April 4, 2023 8:57 AM
To: angus-dev@xxxxxxxxxxx
Subject: [angus-dev] Character set encoding error for processing attachment (UTF-ISO-8859-1)

Hi all,

I received the following error when trying to process attachment using angus-mail maven dependency.
<dependency>
      <groupId>org.eclipse.angus</groupId>
      <artifactId>angus-mail</artifactId>
      <version>2.0.1</version>
</dependency>

The error is: java.io.UnsupportedEncodingException: UTF-ISO-8859-1

Can anyone check this please? Thanks.

Best,

Yuchuan Tao
Senior Software Developer
Buyers Edge Platform


Back to the top