Edgewall Software

Opened 17 years ago

Closed 17 years ago

Last modified 5 years ago

#1065 closed defect (fixed)

charset for ticket mails should be set in ini file

Reported by: achim@… Owned by: Jonas Borgström
Priority: low Milestone: 0.9
Component: ticket system Version: 0.8
Severity: trivial Keywords: mail, charset, msoutlook
Cc: manuzhai@…, nepo@… Branch:
Release Notes:
API Changes:
Internal Changes:


The default charset of the ticket mails is utf-8. If i try to read this mails with outlook i get an ugly view of a non monospaced mail. I have to switch to another charset manually in my ms outlook to see it right. So it would be nice if i could change the charset for the mails in the ini file. My patched version (changed charset) works perfectly for me, but i have to do it manually all the time i install a new version of trac.

Attachments (2)

mailcharset.diff (563 bytes ) - added by Manuzhai 17 years ago.
This should fix #1065.
notify-utf.diff (553 bytes ) - added by Otavio Salvador 17 years ago.
Possible fix. Untested.

Download all attachments as: .zip

Change History (23)

comment:1 by Manuzhai, 17 years ago

Cc: manuzhai@… added

Attached patch makes the Notifier use the trac/default_charset ini-setting.

by Manuzhai, 17 years ago

Attachment: mailcharset.diff added

This should fix #1065.

comment:2 by Jonas Borgström, 17 years ago

What happens if the ticket contains characters that the selected encoding can't represent?

is it really true that outlook can't handle utf-8 encoded emails? Or are we just not formatting them properly? I've never actually used outlook myself but I find it hard to believe that such a widely used email client can't handle utf-8 encoded emails.

comment:3 by Manuzhai, 17 years ago

Well, I'm guessing in that case they might have a problem anyway, since the setting is already used in several other places as well. I'm not sure it's a use case you want to support?

Actually, do browsers change their input according to the page on which the form is served? Would make a lot of sense, but I'm not sure.

comment:4 by Otavio Salvador, 17 years ago

I found some information about Outlook support for UTF-8. You can take a look here: http://home.att.net/~jameskass/interoutlook.html

comment:5 by Otavio Salvador, 17 years ago

I did a try to solve it but I can't test to check if it works. Please, can someone check it?

by Otavio Salvador, 17 years ago

Attachment: notify-utf.diff added

Possible fix. Untested.

comment:6 by Manuzhai, 17 years ago

That's what it already sends! Don't think that doesn't help much. :)

Check line 154, where MIMEText is instantiated with a content-type.

comment:7 by Otavio Salvador, 17 years ago

But then it's not trac fault but MUA fault. If we provide the headers with this information is MUA job deal with it…

Ok, could be useful allow the user set the encoding of mails. To me, for example, ISO-8859-1 is really fine so I can set it and solve this problem to my users otherwise looks like the user need to setup Outlook or any other MUA to view the message according the charset.

comment:8 by Manuzhai, 17 years ago

Which is exactly what my patch does. :) jonas?

comment:9 by Jonas Borgström, 17 years ago

I'm not sure it's a good idea to start adding workarounds to Trac just because some people use broken/misconfigured email clients. A new FAQ entry explaining how to configure outlook express might be a better idea.

The "default_charset" setting is currently used to help Trac to convert file contents _to_ utf-8 when doing syntax highlighting. Trac always use utf-8 when sending stuff to the browser.

comment:10 by Manuzhai, 17 years ago

That makes sense. So this should be closed:invalid? Or we should get someone using OE to write some text in the FAQ about how to configure it. :)

comment:11 by Jonas Borgström, 17 years ago

I would like that some OE user confirmed that this is just an OE-configuration issue and that (if needed) a FAQ-entry is added about how to properly configure OE.

comment:12 by Manuzhai, 17 years ago

But since that would not be in the code, we can probably shift it to 0.9, right? ;)

comment:13 by achim@…, 17 years ago

i would prefer not using the default charset for mailing. i would be better to use a new ini variable like smtp_charset to set charset for the notify mails.

comment:14 by Jonas Borgström, 17 years ago

Yeah, I agree with you. It's not a good idea to use "default_charset". _If_ we are going to add this workaround it should have it's own variable. But someone needs to show that this is not just an OE-configuration problem before we'll add anything.

comment:15 by nepo@…, 17 years ago

I have tried it with Outlook (not Outlook Express, some people seem to mis up the two). Applying the notify-utf.diff patch does not make any difference. Outlook recognizes the mail as UTF-8 before and after the patch.

I think changing the carachter set to something different is the wrong way to solve this because the message content actually is encoded in UTF-8 after all. Since people use national language characters (I am German) using something other than UTF-8 produces wrong characters in the mail. I would blame Microsoft on this one.

As an alternative I suggest not using the dashed horizontal and vertical lines. That way it looked better with non-monospaced fonts.

comment:16 by Norbert Unterberg <nepo@…>, 17 years ago

Cc: nepo@… added

This is a pure Outlook error. It can be solved by seetting an option in MS Outlook. You can find the option here (don't know the exact english phrases, I have a German Outlook):

Extras —> Options… —> Email format —> Fonts … —> International Fonts …

Highlight Unicode in the language list, select Courier New as the proportional font, and chose Unicode (UTF-8) as encoding.

The only issue remaining with MS Outlook is #1139. I have not tried Outlook Express.

comment:17 by Otavio Salvador, 17 years ago

Since it's a Outlook fault this ticket can be closed IMHO. Like Jonas proposed, it need a entry on FAQ and only it.

Anyone don't agree?

comment:18 by Christopher Lenz, 17 years ago


If there's anything we're going to do about this, definitely not for 0.8.1.

comment:19 by anonymous, 17 years ago

Just wanted to confirm that Norbert's fix solves the problem. This is purely an Outlook bug.

comment:20 by Jonas Borgström, 17 years ago

Resolution: fixed
Status: newclosed

I've added a TracFaq entry so I'm closing this ticket now.

comment:21 by Peter Suter, 5 years ago

Keywords: msoutlook added

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.