Subject: | Encode hangs with PerlIO decoding the attached file |
The attached file is decoded from a spam, and declares itself as iso-2022-jp. When I try the following:
perl -e 'open(my $fh, "./split/100T_1X_PM3_EMQ_MT__message.txt") || die $!; binmode($fh, ":encoding(iso-2022-jp)") || die $!; while (<$fh>) { print }'
It just hangs there, using 100% CPU.
This is on perl 5.8.1 that ships with Mac OS X Panther.
<MÒ> DM-Master s¢cJæîò1-2-27 Îì@O 090-8159-3461
<ÆÒ> lbg`l
.zMâ~Ìûͱ¿çÜÅ@master1@yume.otegami.com
.¦zMâ~豫©çñ48ÔÈàŽf³êÜ·B
.[N[jO@íÌÌáÉæèñàzMâ~ÌlÉ
.ÁÄ¢éÂ\«ª èܵ½B½É\µó èܹñŵ½B
.»Ìæ¤ÈûͼÉuñÚvÆñðLüµÄãLAhXÉÁľ³¢B
.»êÈOÌûͼÉzMâ~ÆLüµÄãLAhXÉÁľ³¢B
.II¦K¸zMâ~ÌAhX©ç¨è¾³¢II
.
.
.*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*
.TCgªÁ¦ÄµÜ¤°êª èÜ·ÌÅA¨ßÉ©Éĺ³¢Ëô
.*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*
.
.@@@@@@@@@@ÝÉÀèIèØêÔßII
.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
.b@@@@@ ââ@http://net-channel.info/@áá
.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
.
.¡ ¡\\\\\\\\\\\\\\\\\\\\\\\\\\
. ¡
.¡@@@\òR̨ql̺ɨ¦µÄ...\
.@@@@@@@@@¢ÉÅVŨófWªoêII
.
.@@@@@@@@¨qlÌúÒð Øèܹñ
.
.\\\\\\\\\\\\\\\\\\\\\\\\\\¡ ¡
.
.@}«j«A«É«Í«
.@ª®ª®ª®ª®ª®
.@½«Ü«ç«È«¢«f««Î«©«è«Ì«©«M«ì«
.@ª®ª®ª®ª®ª®ª®ª®ª®ª®ª®ª®ª®ª®ª®
.
.@@@@úÒÊèÌ1Å·BÆ©ÉÆE üè©M èB
.
.I___N___D___E___X__________________________________________
.
.PDACh¨óf
.
.QDfl¨óf
.
.RDB¨óf
.
.SDCv¨óf
.
.TD»Ì¼@Ã~æÈÇ
.
.@@@@@@@@@@@@@@@@@@@@2980~æè
.___________________________________________________________
.
.ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªª
.
.@@@@@@BàRâç¹ÈµÌ{¨AoÅ·B
.
.@@@@@@@@ÇêàµIɵIðd˽©MìB
.
.ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªª
.
.@@@@@@@@@@ÝÉÀèIèØêÔßII
.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
.b@@@@@ ââ@http://net-channel.info/@áá
.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
.
.*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*
.TCgªÁ¦ÄµÜ¤°êª èÜ·ÌÅA¨ßÉ©Éĺ³¢Ëô
.*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*c*