Skip Menu |

This queue is for tickets about the MIME-Lite-TT-HTML CPAN distribution.

Report information
The Basics
Id: 80185
Status: new
Priority: 0/
Queue: MIME-Lite-TT-HTML

People
Owner: Nobody in particular
Requestors: s_dmitriev [...] inbox.ru
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Encoding of the Subject
The problem is, 'subject' in cyrillic gets encoded wrong way. To deal with, I've created (temporary) patch (attached). This way, Subject must be external-encoded then just flag is passed to constructor that subject is externally encoded and does not need to be additinally encoded. Usage like this: use Encode; ... my $subj = encode('MIME-Q', 'Статус заказа'); my $msg = MIME::Lite::TT::HTML->new( 'From' => ... , 'To' => ... , 'DoNotEncodeSubject' => 1 , 'Subject' => $subj, , 'TimeZone' => 'Europe/Moscow', , 'Encoding' => '8bit' , 'Charset' => 'utf8' ...
Subject: MIME-Lite-TT-HTML.patch
22,28c22,27 < From => 'from@example.com', < To => 'to@example.com', < EncodeSubject => 1, < Subject => 'Subject', < TimeZone => 'Asia/Shanghai', < Encoding => 'quoted-printable', < Template => { --- > From => 'from@example.com', > To => 'to@example.com', > Subject => 'Subject', > TimeZone => 'Asia/Shanghai', > Encoding => 'quoted-printable', > Template => { 113d111 < my $do_not_encode_subject = delete $options->{ DoNotEncodeSubject } || 0; 124,128c122 < Subject => ( < $do_not_encode_subject < ? delete $options->{ Subject } < : encode_subject( delete $options->{ Subject }, $charset_input, $charset_output ) < ), --- > Subject => encode_subject( delete $options->{ Subject }, $charset_input, $charset_output ),