View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008572 | mantisbt | localization | public | 2007-11-12 18:32 | 2009-06-23 15:26 |
Reporter | janusz | Assigned To | jreese | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.0rc2 | ||||
Target Version | 1.1.3 | Fixed in Version | 1.2.0rc1 | ||
Summary | 0008572: multibyte str pad problem | ||||
Description | Mantis sends report e-mails with utf-8 encoding with correct utf-8 strings, but uses simple str_pad to padding fields which contains multi byte charaters, but it doesn't work correctly. To solve this bug add mb_str_pad implementation from http://hu.php.net/manual/en/function.str-pad.php#71558 to email_api.php, and change all str_pad to mb_str_pad. I tested it, and it's work correctly. | ||||
Tags | patch | ||||
has duplicate | 0008798 | closed | ryandesign | wrong alignment in email if using german umlaut |
has duplicate | 0007669 | closed | [all lang] Email field padding is not working correctly when using multibyte encodings | |
child of | 0010303 | closed | jreese | Create and use string_api wrappers for multibyte string functions |
any chance to fix it in 1.1.1 |
|
Set target release to 1.1.1. |
|
I have such problem, 1.1.1 version $g_email_padding_length = 28;
G G G 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
? ? ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 G G G 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 when lines contain many russian letters, email formatted like this: ????? ???????? ??????? ??????? ? how i can format it as "only numbers" width? |
|
my comment related to body of added notes, not to header... maybe it is another bug. but as I can see, it's related with WrapText() in phpmailer function bug. see: in class.phpmailer.php try to set $mail->WordWrap = 120; or $mail->WordWrap = 0; - same view, no effect |
|
make a workaround : --- email_api.php.orig 2008-02-25 12:51:51.000000000 +0300
wordwrap() function need to be reworked with utf8 in mind |
|
... also the function "email_format_attribute()" These are the two issues in my opinion! |
|
in 1.1.2, i meet the same problem with wrap text in email. I found alternative to function mb_str_pad from first post, it's utf8Wordwrap from http://ru.php.net/wordwrap (comment at 28-May-2008 03:56) with it, i need to replace only 2 call to wordwrap() to utf8wordwap(). maybe it's more simple than replace all calls to str_pad. |
|
I just happened to stumble across this page. if (! function_exists('mb_str_pad')) {
} |
|
Similar problem exists with Subjects of e-mails. For example this Subject is split into multiple lines incorrectly:
(reported in http://www.mantisbt.org/forums/viewtopic.php?f=3&t=6522 ) |
|
Fixed via issue 0010303 implementing multibyte-aware string functions. |
|