Opened 10 years ago

Closed 7 years ago

#508 closed defect (fixed)

Susimail encoding issues

Reported by: zzz Owned by: zzz
Priority: major Milestone: 0.9.13
Component: apps/susimail Version: 0.8.7
Keywords: Cc:
Parent Tickets: Sensitive: no


HTML Page encoding set to UTF-8 just before the 0.8.8 release, so that translated strings are now rendered properly.

But it appears that mails generated by susimail set the encoding to ISO-8859-1.

Not clear if it honors the encoding in received mails or not.


Attachments (2)

508.diff (4.8 KB) - added by wockenfuss 8 years ago.
diff relative to apps/susimail/src/src/
508-applied.diff (9.9 KB) - added by str4d 8 years ago.
wockenfuss's 508.diff applied to trunk and "mtn diff"-ed

Download all attachments as: .zip

Change History (14)

comment:1 Changed 10 years ago by zzz


comment:2 Changed 9 years ago by slow

JFYI: i saw reports from russian guys that susimail breaks the encoding.

comment:3 Changed 8 years ago by str4d

Milestone: 0.9

comment:4 Changed 8 years ago by str4d

Status: newinfoneeded_new

I loaded up susimail, and looked at a received message (sent by Trac), and the HTML page encoding on the login, mail-list and mail-view pages were all UTF-8.

Is this still a problem? How can the problem be recreated? Is it a problem with the encoding of received messages that were sent by susimail? The HTML page encoding being changed by susimail?

Changed 8 years ago by wockenfuss

Attachment: 508.diff added

diff relative to apps/susimail/src/src/

comment:5 Changed 8 years ago by wockenfuss

Status: infoneeded_newnew
  • replaced all instances of ISO-8859-1 with UTF-8
  • fixed some issues in the classes handling the quoted printable transfer encoding

→ sending / receiving utf-8 mails even in russian does now work, diff is attached

Changed 8 years ago by str4d

Attachment: 508-applied.diff added

wockenfuss's 508.diff applied to trunk and "mtn diff"-ed

comment:6 Changed 8 years ago by str4d

Milestone: 0.9.10
Resolution: fixed
Status: newclosed

Patch looks good. Tested and I can send Russian text between mail.i2p addresses with susimail.

Merged in fb5bd0307a9ae9ec20dbd4dbfd244348660f56ed (thanks wockenfuss!)

comment:7 Changed 7 years ago by zzz

Resolution: fixed
Status: closedreopened

Reopening due to corrupted non-UTF-8 encoded headers (from, to, subject).

The portion of the patch (line 178) changed the decoding of these lines from ISO-8859-1 to UTF-8. However these lines should be in encoded-word format:

With the charset specified between the first two '?' … The form is: "=?charset?encoding?encoded text?=".

But HeaderLine?.decode() ignores the charset parameter at about line 170 - f2 is incremented to skip to the second '?'.

The fix is a challenge because Mail.parseHeaders() assumes UTF-8 encoding across the entire ReadBuffer? (encompassing all headers). So HeaderLine?.decode at line ~200 must decode from the specified charset (if found in the JVM) and reencode back to UTF-8 bytes.

comment:8 Changed 7 years ago by zzz

Sample headers (Russian spam)

Subject: =?windows-1251?B?zvLi5fIg7eAg4uD4IOfg7/Du8TogwuD44CDk?=


From: =?windows-1251?B?zejq7uvg6SDN7uLo6u7i?= <(removed)>

comment:9 Changed 7 years ago by zzz

Owner: set to zzz
Status: reopenedaccepted


comment:10 Changed 7 years ago by zzz

Status: acceptedtesting

comment:11 Changed 7 years ago by zzz

There were more problems on the creation side, when the platform encoding was not UTF-8, as reported by cryptosynthesis.

Hopefully fixed in 0.9.12-9 921c427d38e6930d45df3761da86aa511820d521

comment:12 Changed 7 years ago by zzz

Resolution: fixed
Status: testingclosed
Note: See TracTickets for help on using tickets.