Skip Menu |

This queue is for tickets about the Mail-Mbox-MessageParser CPAN distribution.

Report information
The Basics
Id: 8162
Status: resolved
Priority: 0/
Queue: Mail-Mbox-MessageParser

People
Owner: david [...] coppit.org
Requestors: schmitt [...] phil-fak.uni-duesseldorf.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Module misidentifies a mbox-file as binary
sub _IS_BINARY { my $data_length = CORE::length(${$_[0]}); my $bin_length = ${$_[0]} =~ tr/[\t\n\x20-\x7e]//c; my $non_bin_length = $data_length - $bin_length; return 0; # CHANGED HERE! if (($non_bin_length / $data_length) > .70) { return 0; } else { return 1; } } This test often returns TRUE to valid MBOX-Files. Perhaps because of a uncorrect ascii/binary-relation. Greetings, Tobias Schmitt.
[guest - Thu Oct 28 12:24:00 2004]: Show quoted text
> This test often returns TRUE to valid MBOX-Files. Perhaps because of a > uncorrect ascii/binary-relation.
Can you provide a sample of such a mailbox? What does perl -e 'print ((-B $ARGV[0]) ? "binary\n" : "not binary\n")' the_mailbox say?
I fixed an issue in the binary detection that might have caused this problem. Lacking any response from the original submitter, I'm going to close this speculatively. It should/might be fixed in versions >= 1.5100.