|< 1 2 >| | 11 Einträge, 2 Seiten |
1
2
3
4
5
Content-Type: message/rfc822;
name="=?ISO-8859-15?Q?F=E4hrenpreise?="
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="=?ISO-8859-15?Q?F=E4hrenpreise?="
write-open 7A30B12F37E1E97C77B3B059282E2CA3\F?hrenpreise: Invalid argument at F:/Perl/site/lib/MIME/Body.pm line 414.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
sub output_path {
my ($self, $head) = @_;
### Get the output directory:
my $dir = $self->output_dir($head);
### Get the output filename, decoding into the local character set:
my $fname = unmime $head->recommended_filename;
### Can we use it:
if (!defined($fname)) {
$self->debug("no filename recommended: synthesizing our own");
$fname = $self->output_filename($head);
}
elsif ($self->ignore_filename) {
$self->debug("ignoring all external filenames: synthesizing our own");
$fname = $self->output_filename($head);
}
elsif ($self->evil_filename($fname)) {
### Can we save it by just taking the last element?
my $ex = $self->exorcise_filename($fname);
if (defined($ex) and !$self->evil_filename($ex)) {
$self->whine("Provided filename '$fname' is regarded as evil, ",
"but I was able to exorcise it and get something ",
"usable.");
$fname = $ex;
}
else {
$self->whine("Provided filename '$fname' is regarded as evil; ",
"I'm ignoring it and supplying my own.");
$fname = $self->output_filename($head);
}
}
$self->debug("planning to use '$fname'");
### Resolve collisions and return final path:
return $self->find_unused_path($dir, $fname);
}
my $fname = unmime $head->recommended_filename;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package MIME::Parser;
# Paching the package
sub output_path
{
my $self = shift;
### We use it, so don't warn!
### &MIME::Tools::whine("output_path deprecated in MIME::Parser");
my $output_path = $self->filer->output_path(@_);
$output_path =~ s![?*"<>]!_!g;
return $output_path;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use MIME::WordDecoder;
#so ?
### Construct:
# $wd = new MIME::WordDecoder::ISO_8859 2; ### ISO-8859-2
#oder so ? :
### Get the default word-decoder (used by unmime()):
$wd = default MIME::WordDecoder;
### What to translate unknown characters to (can also use empty):
### Default is "?".
$wd->unknown("_");
my $fname = $wd->decode($head->recommended_filename);
|< 1 2 >| | 11 Einträge, 2 Seiten |