Last modified: 2013-10-29 23:16:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51437, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49437 - Change notifications incorrectly wrapped in non-ascii languages due to UserMailer.php using wordwrap() which doesn't support Unicode
Change notifications incorrectly wrapped in non-ascii languages due to UserMa...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Email (Other open bugs)
1.22.0
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n, utf8
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-11 14:49 UTC by Dror S.
Modified: 2013-10-29 23:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Shows the bad wrapping. Only about 38 chars per line, with an odd cutoff. (5.31 KB, image/png)
2013-06-11 14:49 UTC, Dror S.
Details

Description Dror S. 2013-06-11 14:49:36 UTC
Created attachment 12516 [details]
Shows the bad wrapping. Only about 38 chars per line, with an odd cutoff.

UserMailer.php uses wordwrap() which doesn't support unicode. An mb function is needed, otherwise the wrapping is just awful in languages such as Hebrew.

UserMailer.php Line 763: 
$this->body = wordwrap( strtr( $body, $postTransformKeys ), 72 );

Some discussion and suggestions here:
http://stackoverflow.com/questions/3825226/multi-byte-safe-wordwrap-function-for-utf-8
Comment 1 Andre Klapper 2013-06-11 16:54:00 UTC
Thanks for taking the time to report this!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links