close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 7 months ago

Closed 7 months ago

#517 closed bug (fixed)

wrong character conversation after deleting attachments

Reported by: anonymous Owned by: tboeckel
Priority: undecided Milestone: YAM 2.9p1
Component: charset handling Version: nightly build
Severity: normal Keywords:
Cc: OS Platform:
Blocked By: Blocking:
Release Notes:

Description

Summary

After deleting one (or more) attachment from the mail, character conversation goes wrong.

Steps to reproduce

  1. use ISO-8859-2 charset (hungarian)
  2. the message body is babábőbőbúbü (nothing sensible) and it contains one picture as an attachment
  1. the raw message is bab=E1b=F5b=F5b=FAb=FC
  2. delete the attachment
  3. the message body will babábőbőbúbü
  4. the raw message is: bab=C3=A1b=C5=91b=C5=91b=C3=BAb=C3=BC

I tried this with many mails and the bug is reproducible.

Attachments (0)

Change History (4)

comment:1 Changed 7 months ago by tboeckel

  • Milestone set to YAM 2.10
  • Status changed from new to accepted

I can reproduce this issue. The malformed raw mail text after deleting an attachment happens because the original mail is parsed using the usual functions. These will always transform the mail text to UTF8 as the current internal representation. However, the following deletion of attachments does a very simple job an writes out all kept parts "as they are", but with the previous content-type in the header lines. Thus you end up with an UTF8 body while the headers state something like ISO-8859-2.

All in all the removal of attachment needs a complete rework, but I doubt this will happen for YAM 2.9p1. Hence I scheduled it for YAM 2.10.

comment:2 follow-up: Changed 7 months ago by tboeckel

  • Milestone changed from YAM 2.10 to YAM 2.9p1
  • Owner set to tboeckel
  • Status changed from accepted to assigned

I think I found a fast solution for this issue. Since the raw mail is recreated while deleting attachments anyway we can also change the charset of the mail part to its current in-memory representation, which is UTF8.

comment:3 in reply to: ↑ 2 Changed 7 months ago by damato

Replying to tboeckel:

I think I found a fast solution for this issue. Since the raw mail is recreated while deleting attachments anyway we can also change the charset of the mail part to its current in-memory representation, which is UTF8.

I also thought about that Thore. But I think it is just a quick hack to get things going. IMHO it would be better to simply reencode the UTF-8 to the old target codeset (ISO-8859-2) after having cropped the attachments instead of saving the mails with UTF-8 encoding. This should also be quite straight forward IMHO.

comment:4 Changed 7 months ago by tboeckel

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7617]) * YAM_MA.c: force the charset of plain texts to UTF8 when removing attachments from mails. This is not a 100% clean solution but it at leasts keeps non 7bit ASCII characters in a suitable encoding which does not malform them. This closes #517.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Thore Böckelmann(Owner, Participant)