Changeset 2638 for trunk/gsdl
- Timestamp:
- 2001-07-11T15:00:50+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/EMAILPlug.pm
r2630 r2638 80 80 my $self = new BasPlug ("EMAILPlug", @_); 81 81 # make sure we don't run textcat (defaults to "auto"); 82 $self->{'input_encoding'}="ascii"; 82 $self->{'input_encoding'}="ascii"; # this might not be good enough... 83 83 return bless $self, $class; 84 84 } … … 474 474 my $part_header=$text; 475 475 $part_header =~ s/\r?\n\r?\n(.*)$//s; 476 $text=$1; 476 $text=$1; if (!defined($text)) {$text="";} 477 477 $part_header =~ s/\r?\n[\t ]+/ /gs; #unfold 478 478 $part_header =~ /content\-type:\s*([\w\/]+)/is; 479 my $type=$1; 479 my $type=$1; if (!defined($type)) {$type="";} 480 480 my $encoding=""; 481 if ($part_header =~ /^content\-transfer\-encoding:\s*([^ s]+)/mis) {481 if ($part_header =~ /^content\-transfer\-encoding:\s*([^\s]+)/mis) { 482 482 $encoding=$1; $encoding=~tr/A-Z/a-z/; 483 483 } … … 545 545 # see rfc2045 for description, but basically, bits 7 and 8 are set to zero; 546 546 # 4 bytes of encoded text become 3 bytes of binary - remove 2 highest bits 547 # from each byte.547 # from each encoded byte. 548 548 549 549
Note:
See TracChangeset
for help on using the changeset viewer.