fred
fred

Reputation: 1822

Mail character encoding

This mail should look like this

Subject: asd asd asd åäö åäö åäö
Content: asd asd asd åäö åäö åäö

But on thunderbird, it looks like this

Subject: asd asd asd åäö åäö åäö
Content: asd asd asd <weird question mark characters>

This is the source as viewed in Thunderbird, is there anything wrong with it?

Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from example.com (example.com [130.237.161.15])
    by example.com (Postfix) with ESMTP id 68270C0A20
    for <[email protected]>; Fri, 11 Apr 2014 04:35:10 +0200 (CEST)
From: Example <[email protected]>
Message-ID: <118563174.68.1397183710419.JavaMail.tomcat7@thesis>
Subject: =?UTF-8?Q?Forum_post:_asd_a?=
 =?UTF-8?Q?sd_asd_=C3=A5=C3=A4=C3=B6_=C3=A5=C3=A4=C3=B6_=C3=A5=C3=A4=C3=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

asd asd asd =E5=E4=F6 =E5=E4=F6 =E5=E4=F6

Upvotes: 1

Views: 963

Answers (1)

tripleee
tripleee

Reputation: 189387

Your content-type says UTF-8 but the body is actually in iso8859-1 or a similar encoding (iso8859-15 is quite similar, for example). Those byte sequences are not valid UTF-8 at all.

The easy fix is to change the charset= to the actual correct value if you know it, or can guess it with some confidence. If you cannot, maybe you should not be generating this message at all.

Upvotes: 1

Related Questions