[horde] encoding problem

yahsuan at Lab400-51.cc.ntu.edu.tw yahsuan at Lab400-51.cc.ntu.edu.tw
Sat May 14 09:47:09 UTC 2011


my horde app version is:
horde                     4.0.1   stable
imp                       5.0.1   stable
ingo                      2.0.1   stable
turba                     3.0.1   stable

and my php version is PHP 5.3.3

I find that when I send a plain text mail, the subject in Chinese will by
encoded,
but if I send a mail with attachment, this mail will be a mime type mail,
and the subject in Chinese will no to be encoded.
This lead a problem when viewing.

If I change the line 111 of /usr/share/php/Horde/Mime/Header.php, in the
function toArray
from
$text = $charset
      ? Horde_Mime::encode(Horde_String::convertCharset($val[$key], 'UTF-8',
$charset), $charset)
      : $val[$key];
to
$text = Horde_Mime::encode(Horde_String::convertCharset($val[$key],
'UTF-8', 'utf-8'), 'utf-8');

it will be ok.

Is this a bug in imp5.0.1?
Since the old version(horde3.3.4) will encode the subject no matter I send
a plain text mail or a mime mail.

Thanks for reply


More information about the horde mailing list