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