UTF8 issues on 5.6

2.1.x < 71 has an issue with unknown charsets on perl 5.6. If
Text::Iconv doesn’t know about the charset, RT dies horribly. 2.1.71
will fix this, but the current fix results in RT dying horribly when it
tries to redisplay the garbage characters (Such as those passed in by
korean spam):

delay=2, status=bounced (Command died with status 9:
“/opt/fsck.com-rt3/bin/rt-mailgate --queue ‘cpan-questions’ --action
‘correspond’ --url http://rt3.fsck.com/”.
Command output: RT server error. The RT server which handled your
email did not behave as expected.
It said: panic: utf8_length: unaligned end at
/usr/local/lib/perl/5.6.1/HTML/Entities.pm line 399.
Stack:
[/usr/local/lib/perl/5.6.1/HTML/Entities.pm:399]
[/usr/local/share/perl/5.6.1/HTML/Mason/Escapes.pm:32]
[/usr/local/share/perl/5.6.1/HTML/Mason/Interp.pm:764]
[/opt/fsck.com-rt3/share/html/REST/1.0/NoAuth/mail-gateway:42]

So, autrijus, got any bright ideas here? If we don’t know the charset,
should we smash it all down to lower-127 ascii?

Jesse

�|� Request Tracker — Best Practical Solutions – Trouble Ticketing. Free.

2.1.x < 71 has an issue with unknown charsets on perl 5.6. If
Text::Iconv doesn’t know about the charset, RT dies horribly. 2.1.71
will fix this, but the current fix results in RT dying horribly when it
tries to redisplay the garbage characters (Such as those passed in by
korean spam):

delay=2, status=bounced (Command died with status 9:
“/opt/fsck.com-rt3/bin/rt-mailgate --queue ‘cpan-questions’ --action
‘correspond’ --url http://rt3.fsck.com/”.
Command output: RT server error. The RT server which handled your
email did not behave as expected.
It said: panic: utf8_length: unaligned end at
/usr/local/lib/perl/5.6.1/HTML/Entities.pm line 399.
Stack:
[/usr/local/lib/perl/5.6.1/HTML/Entities.pm:399]
[/usr/local/share/perl/5.6.1/HTML/Mason/Escapes.pm:32]
[/usr/local/share/perl/5.6.1/HTML/Mason/Interp.pm:764]
[/opt/fsck.com-rt3/share/html/REST/1.0/NoAuth/mail-gateway:42]

So, autrijus, got any bright ideas here? If we don’t know the charset,
should we smash it all down to lower-127 ascii?

See RT::I18N::SetMIMEEntityToEncoding? It was written when I tried to
convert email message body into utf-8.

It uses Encode::Guess to guess what the encoding of email could be.
Maybe you’d like to refactor it to be more general to work with other
functions.

plasma

��Ǭ��y���Y�h�x�H,��o�|�����ݬ�~
http://edm-prg.epaper.com.tw/click.php?ad_code=1895
PC home Online �����a�x�G�|���Ĥ@�A�x�W�̤j���J�f����