/[mws]/trunk/lib/MWS.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/MWS.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 47 by dpavlin, Tue May 11 22:59:27 2004 UTC revision 50 by dpavlin, Sun May 16 22:22:27 2004 UTC
# Line 254  sub decode_qp($) { Line 254  sub decode_qp($) {
254    
255                  print STDERR "$qp\n" if ($debug == 2);                  print STDERR "$qp\n" if ($debug == 2);
256    
257                  my $iconv = Text::Iconv->new($cp,'ISO-8859-2');                  my $iconv;
258                  return $iconv->convert($qp) || '';                  eval '$iconv = Text::Iconv->new($cp,"ISO-8859-2")';
259                    if ($iconv) {
260                            return $iconv->convert($qp) || '';
261                    } else {
262                            return $qp;
263                    }
264          }          }
265    
266          $tmp =~ s/=\?([^\?]+)\?([QB])\?(.+?)\?=/decode($1,$2,$3)/ige;          $tmp =~ s/=\?([^\?]+)\?([QB])\?(.+?)\?=/decode($1,$2,$3)/ige;
# Line 342  sub plain_text_body { Line 347  sub plain_text_body {
347          # reformat with Text::Autoformat          # reformat with Text::Autoformat
348          my $wrap = $self->{wrap_margin};          my $wrap = $self->{wrap_margin};
349          if ($wrap && $body && $body =~ m/^.{$wrap}..*$/m) {          if ($wrap && $body && $body =~ m/^.{$wrap}..*$/m) {
350                  $body = autoformat($body, {right=>$wrap, all=>1});                  eval '$body = autoformat($body, {right=>$wrap, all=>1});';
351                  $body .="\n[reformated using autoformat, margin at $wrap]" if ($debug == 2);                  $body .="\n[reformated using autoformat, margin at $wrap]" if ($debug == 2);
352          }          }
353    

Legend:
Removed from v.47  
changed lines
  Added in v.50

  ViewVC Help
Powered by ViewVC 1.1.26