https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21874
--- Comment #10 from Marcel de Rooy <[email protected]> --- (In reply to Katrin Fischer from comment #9) > Trying to pinpoint the difference. The queue emails have this: > > 1286 my $utf8 = decode('MIME-Header', $message->{'subject'} ); > 1287 $message->{subject}= encode('MIME-Header', $utf8); > 1288 my $subject = encode('UTF-8', $message->{'subject'}); > > The shelf has: > > 114 # Analysing information and getting mail properties > 115 if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { > 116 $mail{'subject'} = Encode::encode("UTF-8", $1); > 117 $mail{subject} =~ s|\n?(.*)\n?|$1|; > > > Wonder if the encode('MIME-Header'... is the magical difference? This is very nasty code. Minefield (mime..mine :) Lines 1286 and 1287 are obscure. An undocumented tric to decode/encode. Weird that it works. My first thought would be: $message->subject is from the database and is in perl internal format, not in MIME encoding. The decode does not result in utf8 so the var name is a bad choice(!). Should not do very much? The line 1287 encodes to MIME. Line 1288 is weird after encoding to MIME. Using still Mail::Sendmail with all its limitations in encoding etc. is another pitfall. So we should not be too hasty here. But all this encoding/decoding before calling sendmail should be moved away to one single testable module and no leftovers in several scripts. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
