Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Sunday December 07, 2003
01:47 PM

Two weird bugs in Encode found...

[ #16203 ]

I've posted the first of these to RT, the second I'll try and get around to creating a patch for because I can fix it...

First bug: I have a particular file that results from decoding a particular japanese spam that Encode simply hangs on when used via perlio (it works fine when used via from_to, but I *need* perlio for my app so that I can fling filehandles around). I have worked around this bug by checking I can read the first line in an "alarm" section before returning the perlio translated filehandle back to the caller. A bit hacky but it works.

Second bug: While trying to make this really easy for Dan Kogai to reproduce I was trying to get piconv (the perl iconv command line tool replacement) to work in perlio mode. There's a typo in piconv that prevents you using any other scheme than from_to. Here's the required diff line:

-my $scheme = exists $Scheme{$Opt{Scheme}} ? $Opt{Scheme} :  'from_to';
+my $scheme = exists $Scheme{$Opt{scheme}} ? $Opt{scheme} :  'from_to';

Simple case problem in hash access - how many of us have been bitten by that little one in the past eh?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.