Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the File-MimeInfo CPAN distribution.

Report information
The Basics
Id: 30959
Status: resolved
Priority: 0/
Queue: File-MimeInfo

People
Owner: Nobody in particular
Requestors: kas [...] fi.muni.cz
Cc:
AdminCc:

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



Subject: The non-printable character is \x7F, not \xF7
The MimeInfo.pm contains the following line: return 'text/plain' unless $line =~ /[\x00-\x1F\xF7]/; which is not correct, as \xF7 is normal Latin-<N> character. The author probably meant the ASCII DEL character, \x7F, instead. Patch attached, please apply. Note however that the text/plain detection is still broken, as reported in ticket #30958.
Subject: MimeInfo-7F.patch
--- /usr/lib/perl5/vendor_perl/5.8.8/File/MimeInfo.pm 2007-08-08 12:08:51.000000000 +0200 +++ /tmp/MimeInfo.pm 2007-11-24 22:17:47.000000000 +0100 @@ -121,7 +121,7 @@ if ($] < 5.008 or ! utf8::valid($line)) { use bytes; # avoid invalid utf8 chars $line =~ s/\s//g; # \m, \n and \t are also control chars - return 'text/plain' unless $line =~ /[\x00-\x1F\xF7]/; + return 'text/plain' unless $line =~ /[\x00-\x1F\x7F]/; } else { # use perl to do something intelligent for ascii & utf8
Fixed in 0.15