-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Niko, Patrick,
Thanks for all your investigating and research. 11/04/2013 08:54 - Patrick Matthäi wrote: > Am 03.11.2013 15:04, schrieb Niko Tyni: > > I'm reassigning this against libmime-tools-perl again - if this is an > > intentional limitation there, it should at least be documented better. > > Preferrably, I suppose MIME::Body::InCore should transparently encode > > Unicode data before making an in-memory file out of it. (This needs to > > be discussed upstream, of course.) I'm not sure this is correct. I think it *does* need documentation in MIME::Entity. > > In this case, OTRS hits it in Kernel::System::Email::Send() when it gets > > a body containing HTML elements that map onto non-latin characters, > > for instance ♠ . The $Self->{HTMLUtilsObject}->ToAscii() call > > around line 288 of Kernel/System/Email.pm then converts the elements into > > Unicode characters, which are later passed to MIME::Entity->build() as-is. > > > > If necessary, OTRS could work around the problem by encoding the string > > first. It already does for some cases, around line 316 or so: > > > > # body encode if utf8 and base64 is used > > if ( $Header{Encoding} =~ /utf(8|-8)/i && $Header{Encoding} =~ > > /base64/i ) { > > $Self->{EncodeObject}->EncodeOutput( \$Param{Body} ); > > } These conditions will not be true at the same time, I think. > > Making this EncodeOutput() call unconditional fixes the crash for me, > > probably at the cost of some double encoding later. (I don't use OTRS > > myself so I didn't really test that any further, but it seems too simple > > minded to be a proper fix.) > > > > Much thanks for working this out, I have also sent the information to > OTRS upstream, so that they also could workaround this problem. It is related to this change in Perl 5.18: http://blogs.perl.org/users/tony_cook/2013/02/perl-io-on-scalars.html I think while it might *seem* too simple it really is the proper fix for OTRS. it's fixed in rel-3_2: https://github.com/OTRS/otrs/commit/3200f38e4ece3b73c1d8f98642b0bf30f5e39043 and master: https://github.com/OTRS/otrs/commit/eda2b2b9a19eeaf513be3d214ab5b680d87c49e3 - -- Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iF4EAREIAAYFAlJ3hpsACgkQoLql6G61CtrtkgD/ad9Mq60ORu/6ARXFTfcqrEld 3fw3YGKJKgbvAwxXZZYA/1zf6cAhkaoUmYpgUrhPaD5oGTtna42SuhNGitD2FZ3O =Bm9e -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org