Ticket #1485714 (closed Bugs: fixed)
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:
- Use one of the bypass functions which may be found in the comments here: http://php.net/wordwrap
- 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
Change History
Note: See
TracTickets for help on using
tickets.
