Diff for /mail2lj/mail2lj.pl between versions 1.4 and 1.5

version 1.4, 2007/08/14 04:19:50 version 1.5, 2007/08/14 05:38:33
Line 207  if ( exists $Opt{'comments'} ) { Line 207  if ( exists $Opt{'comments'} ) {
 # with other parameters.  # with other parameters.
 $Opt{'prop_taglist'} = join( ", ", @opt_taglist )  if ( @opt_taglist ) ;  $Opt{'prop_taglist'} = join( ", ", @opt_taglist )  if ( @opt_taglist ) ;
   
 # Convert all command line options to unicode.  # Convert $opt_ljcut_text to UTF8.
   if ( defined $opt_ljcut_text ) {
      $opt_ljcut_text = 
           to_utf8({ -string => $opt_ljcut_text, -charset => $SystemCharset }) ;
   }
   
   # Convert all %Opt command line options to unicode.
 # Function href2utf8() uses a reference to input hash, so %Opt is  # Function href2utf8() uses a reference to input hash, so %Opt is
 # being modified "in-place".  # being modified "in-place".
 href2utf8( \%Opt, $SystemCharset) ;  href2utf8( \%Opt, $SystemCharset) ;
Line 604  sub post_me2req { Line 610  sub post_me2req {
   
         # Changed by LG - added options to add the 'From' field to the          # Changed by LG - added options to add the 'From' field to the
         # posted message.          # posted message.
           # 
           # NOTE: $from is already in UTF8.  Strictly speaking, everything
           #       that we add to it MUST ALSO BE IN UTF8 (i.e. you need to run
           #       a to_utf8() function on it).  But since all I'm adding is in
           #       ISO-8859-1 lower ASCII characters (which are guaranteed to
           #       have the same values in UTF8 as in plain ISO-8859-1), I'm
           #       cheating here and taking a shortcut. If you want to add
           #       something non-ASCII, you MUST convert it to UTF8 first!
           #       Be forewarned!
         if ( $opt_addfrom ) {          if ( $opt_addfrom ) {
            $hr->{event} = "From: $from" . "\n\n" . $hr->{event} ;             $hr->{event} = "From: $from" . "\n\n" . $hr->{event} ;
              $hr->{event} = $plain_from . $hr->{event} ;
         } elsif ( $opt_addfromh ) {          } elsif ( $opt_addfromh ) {
            my $html_from = "<nobr><i><b>From:</b> $from</i></nobr>" ;             my $html_from = "<nobr><i><b>From:</b> $from</i></nobr>" ;
            $html_from =~ s/\@/[_\@_]/g ;             $html_from =~ s/\@/[_\@_]/g ;

Removed from v.1.4  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>