Modify

Opened 5 years ago

Last modified 11 months ago

#7791 reopened defect

[patch] charset="us-ascii" in text part of html announcement

Reported by: g1itch Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: trivial Keywords: charset
Cc: jbeilicke Trac Release: 0.12

Description

When I choose the 'text/html' announcement format the first part of multipart/alternative mime has Content-Type: text/plain; charset="us-ascii", but second - Content-Type: text/html; charset="utf-8"

[announcer]
mime_encoding = qp

Why? How can I change this behavior?

The message contains cyrillic characters. Then I choose multiple messages in Thunderbird, it displays something like Приоритет. MS Outlook displays such characters always.

Attachments (0)

Change History (8)

comment:1 Changed 4 years ago by g1itch

Alternative part appears without charset setting:

  • distributors/mail.py

    old new  
    489489
    490490            alt_msg_format = 'html' in alternate_style and 'html' or 'plain'
    491491            msgText = MIMEText(alternate_output, alt_msg_format)
     492            msgText.set_charset(self._charset)
    492493            parentMessage.attach(msgText)
    493494        else:
    494495            parentMessage = rootMessage

comment:2 Changed 4 years ago by g1itch

  • Severity changed from normal to trivial
  • Summary changed from charset="us-ascii" in text part of html announcement to [patch] charset="us-ascii" in text part of html announcement

comment:3 Changed 4 years ago by jbeilicke

  • Cc jbeilicke added; anonymous removed

comment:4 Changed 2 years ago by hasienda

(In [12341]) TracAnnouncer: Apply suitable charset to alternative part of email message as well, refs #7791.

This fixes inappropriate alternative text display of non-ascii characters in HTML emails, that get sent out as multi-part message in MIME format.

This has been reported by g1itch, who did investigations and patch as well. Works like a breeze, but this must have been much harder to fix than one would expect at first glance onto this one-liner. It's a pleasure to follow your footsteps, thanks a bunch.

comment:5 follow-up: Changed 11 months ago by g1itch

  • Resolution set to worksforme
  • Status changed from new to closed

Still open?

comment:6 in reply to: ↑ 5 ; follow-up: Changed 11 months ago by hasienda

  • Owner changed from doki_pen to hasienda

Replying to g1itch:

Still open?

Yeah, personal preference to keep tickets open for a while/next stable release, encouraging testers to report back as you did - thanks.

comment:7 in reply to: ↑ 6 Changed 11 months ago by g1itch

Replying to hasienda:

Replying to g1itch:

Still open?

Yeah, personal preference to keep tickets open for a while/next stable release, encouraging testers to report back as you did - thanks.

My personal preference is to apply patch and forget. I found this while looking for #10974.

comment:8 Changed 11 months ago by rjollos

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Worksforme would certainly not be the proper resolution, regardless. Please leave tickets for project maintainer to manage as they see fit.

Last edited 11 months ago by rjollos (previous) (diff)

Add Comment

Modify Ticket

Action
as reopened The owner will remain hasienda.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.