Bug 305498: UTF-8 e-mail encoding is not working - Patch by Cedric Caron <cedric.caron@urbanet.ch> r=glob a=justdave

This commit is contained in:
lpsolit%gmail.com 2005-08-25 13:51:48 +00:00
Родитель a784cdd1a3
Коммит 75b3d0f548
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -711,10 +711,10 @@ sub encode_message {
# than half the message is 7-bit clean
my $count = ($body =~ tr/\x20-\x7E\x0A\x0D//);
if ($count > length($body) / 2) {
$head->replace('Content-Transfer-Encoding', 'quoted-printable');
$head->mime_attr('Content-Transfer-Encoding' => 'quoted-printable');
$body = encode_qp($body);
} else {
$head->replace('Content-Transfer-Encoding', 'base64');
$head->mime_attr('Content-Transfer-Encoding' => 'base64');
$body = encode_base64($body);
}
}