Ticket #1485714 (closed Bugs: fixed)

Opened 14 months ago

Last modified 12 months ago

Incorrect word wrapping in outgoing plaintext messages

Reported by: Roman Imankulov Owned by: thomasb
Priority: 5 Milestone: 0.2.2
Component: Core functionality Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

There is a closed bug #1484148 about overlength lines in plaintext messages.

Unfortunately, the fix provided does not cover multibyte strings due to PHP wordwrap() function nature, which works only with single-byte encodings (used in rcmail_wrap_quoted() function). This results in too short lines with non-latin characters (reproduced on any non-latin UTF-8 messages).

Conceptually I see at least two alternative solutions:

  1. Use one of the bypass functions which may be found in the comments here: http://php.net/wordwrap
  2. Use the custom Content-Transfer-Encoding and encode message body (i.e. encode message text with base64 and use "Content-Transfer-Encoding: base64").

I think the second option is more preferable because it does not insert unrequested line breaks in the message body and generates pure ASCII message.

Attachments

wordwrap.patch (4.6 KB) - added by alec 13 months ago.
check this one

Change History

Changed 14 months ago by alec

  • milestone changed from later to 0.2.1

Changed 13 months ago by alec

check this one

Changed 13 months ago by alec

  • owner set to thomasb

Changed 12 months ago by alec

  • status changed from new to closed
  • resolution set to fixed

Fixed in r2368.

Note: See TracTickets for help on using tickets.