You are here: Foswiki>Tasks Web>Item4077 (05 Jul 2015, GeorgeClark)Edit Attach

Item4077: Invalid quoted-printable encoding in mail subject lines

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: I18N, Unicode
Branches:
Reported By: TWiki:Main.AlexanderSmishlajev
Waiting For:
Last Change By: GeorgeClark
With site language set to ru and site charset utf-8 TWiki encodes subject lines in email messages like this:

Subject: [Twiki] =?iso-8859-1?q?TWiki_-_=D0=A0=D0=B5=D0=B3=D0=B8=D1=81=D1?=
   =?iso-8859-1?q?=82=D1=80=D0=B0=D1=86=D0=B8=D1=8F_=D0=B4=D0=BB=D1?=
   =?iso-8859-1?q?=8F_TWikiUser_=28user=40my=2Esite=29?=

(this example is taken from registration notification email).

The text is quoted-printable encoded UTF-8, but MIME encoding is declared to be iso-8859-1.

-- TWiki:Main/AlexanderSmishlajev - 16 May 2007

This is a generic TWiki problem, not specific to MailerContrib I believe.

CC

I applied the patch attached to bug item 3969 and use the following settings in LocalSite.cfg:

  • $TWiki::cfg{Site}{Locale} = 'zh_TW.utf8';
  • $TWiki::cfg{Site}{CharSet} = 'utf-8';
  • $TWiki::cfg{Site}{Lang} = 'zh';
  • $TWiki::cfg{Site}{FullLang} = 'zh-tw';

While the email body is in utf-8 and correctly displayed, the headers are not. They are not even quoted-printable in my system. I haven't spent time looking into the problem but it should be solved before next major release.

-- TWiki:Main.HowardTsai - 15 Aug 2007

I attached a patch that fix the encoding of the "From: " and "Subject: " line in UTF-8 environment. It include puts quotation marks `"' to senders (e.g., "TWiki Administrator").

-- TWiki:Main.HowardTsai - 19 Aug 2007

TWiki doesn't support Unicode properly so I'm not too surprised, but this sort of thing does need fixing.

Thanks for the patch, which of course is very UTF8-specific - we really need full TWiki:Codev.UnicodeSupport, as there are more and more areas where we need UTF-8 or simply need the power of Unicode to fix I18N issues.

-- TWiki:Main.RichardDonkin - 23 Aug 2007

Fixed in unicode core.

-- CrawfordCurrie - 19 May 2015

ItemTemplate edit

Summary Invalid quoted-printable encoding in mail subject lines
ReportedBy TWiki:Main.AlexanderSmishlajev
Codebase
SVN Range TWiki-4.1.2, Sun, 13 May 2007, build 13714
AppliesTo Engine
Component I18N, Unicode
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease major
ReleasedIn 2.0.0
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic attachments
I Attachment Action Size Date Who Comment
utf8-email-header.patchpatch utf8-email-header.patch manage 9 K 19 Aug 2007 - 14:25 UnknownUser UTF-8 patch for header lines, also enclose sender/recipient in quotes
Topic revision: r10 - 05 Jul 2015, GeorgeClark - This page was cached on 01 Jun 2016 - 03:57.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License