Forum Moderators: phranque
This site has been a great resource for me and I appreciate all the contributors.
I've spent a couple of days scratching my head over an issue regarding character encoding in email subject line, I hope there is some one who can point me in the right direction!
I am sending HTML emails with Greek text (also Portuguese but I guess issue is same whatever language). I am using UTF-8 character set. Greek text shows fine in the email body but is unpredictable in subject line.
An email in Greek from our email service provider shows fine in Gmail, but subject line is garbled in Outlook.
An email with Greek in subject line sent to Gmail from Outlook only shows correctly if Greek ISO character is selected in Outlook options. If UTF-8 is selected Greek subject line is garbled in Gmail.
I haven't even thougt about seeing how other email clients/services handle this yet.
Anyone have any experience with this, or able to suggest a good approach?
Cheers,
Michael
(Nothing to do with the bank btw!)
i think you want to use the MIME Encoded-Word syntax [en.wikipedia.org].
I've got the email service provider to change the server setting to UTF-8, which is a start. My problem remains, which is that the subject line is not showing as expected, in Outlook.
Before it was this: Analysis5 - N OOON?O
Now the message is sent as UTF-8 it's this: Analysis5 - ?t?p?a? ?e?t? ?d?s? ?a?asµ? ?a? a?a?t? st?e?a
I'm not sure thats much of an improvement! The question marks etc should be Greek text.
As mentioned in my previous post, Gmail displayed the subject line correctly, even before they changed the server settings for me!
Here is the message header from Outlook with some info removed:
Microsoft Mail Internet Headers Version 2.0
Content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133
Importance: normal
Priority: normal
X-VirusChecked: Checked
X-Env-Sender: bounce-148024_HTML-99857609-3837435-30262-0@bounce.exacttar example.com
X-Msg-Ref: server-12.tower-142.messagelabs.com!1203590915!24941150!1
X-StarScan-Version: 5.5.12.14.2; banners=-,-,example.com
X-Originating-IP: [66.231.86.zzz]
X-SpamReason: No, hits=0.7 required=7.0 tests=HTML_60_70,HTML_MESSAGE, MIME_HTML_ONLY
Received: (qmail 25291 invoked from network); 21 Feb 2008 10:48:35 -0000
Received: from ae177.mta.example.com (HELO ae177.mta.example.com) (xx.#*$!.86.177) by server-12.tower-142.messagelabs.com with SMTP; 21 Feb 2008 10:48:35 -0000
Received: by ae177.mta.example.com (PowerMTA(TM) v3.2r22) id hnlbg60bni88 for <name(at)example.com>; Thu, 21 Feb 2008 04:48:35 -0600 (envelope-from <bounce-148024_HTML-99857609-3837435-30262-0@bounce.example.com>)
From: "#*$!#*$!" <#*$!#*$!(at)#*$!#*$!x.com>
To: <name(at)example.com>
Subject: =?UTF-8?Q?Analysis5_-_=3F=3F=3Ft=3Fp=3F=3F=3Fa=3F=3F_=3F=3Fe=3Ft?=
=?UTF-8?Q?=3F=3F=3F=3F=3F=3F_=3F=3Fd=3Fs=3F_=3F=3F=3Fa=3F=3F?=
=?UTF-8?Q?as=C2=B5=3F=3F_=3Fa=3F_a=3Fa=3F=3Ft=3F=3F=3F_st=3F=3F=3Fe=3Fa?=
Date: Thu, 21 Feb 2008 04:48:29 -0600
List-Unsubscribe: <mailto:leave-longcodenumber-fe4a1d797d61037b751d-fe8e17787663007e70-ff021770776206@leave.example.com>
MIME-Version: 1.0
x-job: 30262_3837435
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-ID: <47BD5703.00000014@ae177.mta.example.com>
Return-Path: <bounce-148024_HTML-99857609-3837435-30262-0@bounce.example.com>
X-OriginalArrivalTime: 21 Feb 2008 10:48:36.0932 (UTC) FILETIME=[4FD49040:01C87477]
I'm not familiar enough with email generally to get much out of this but I'm looking at the header from the same email received by Gmail and the subject line there appears fine (i.e. exactly as I want it to appear to the recipient).
So at some point the subject line with Greek characters gets garbled before (or when) it reaches Outlook!
It looks like the header is added to or altered as it makes its way from the email service provider to my machine, I'm guessing that's where the problem lies?
Thanks again,
Michael
[edited by: engine at 12:22 pm (utc) on Feb. 21, 2008]
[edit reason] examplified [/edit]
I'm just digesting the info you linked to regarding MIME Encoded-Word syntax.
Does this mean that to guarantee characters are displayed correctly in all clients/webmail services, certain characters must be entered into the subject line using ASCII encoding that represents those characters? A bit like special characters in html?
Will have another read through this afternoon.
Thanks again.