/[webpac]/trunk2/all2all.pl
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 /trunk2/all2all.pl

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

revision 549 by dpavlin, Tue Oct 26 20:53:03 2004 UTC revision 550 by dpavlin, Tue Oct 26 21:44:57 2004 UTC
# Line 53  sub unac { Line 53  sub unac {
53          my $string = shift || return;          my $string = shift || return;
54          $string = unac_string($code_page,$string);          $string = unac_string($code_page,$string);
55          $string =~ tr//dD/;          $string =~ tr//dD/;
56            $string = unac_entities($string);
57          return $string;          return $string;
58  }  }
59  sub unac_2 {  sub unac_2 {
# Line 63  sub unac_2 { Line 64  sub unac_2 {
64                  $string =~ tr//dD/;                  $string =~ tr//dD/;
65                  $string = $pr . $string;                  $string = $pr . $string;
66          }          }
67          $string =~ s/&(\w)(acute|cedil|circ|grave|ring|slash|tilde|uml);/$1/gi;          $string = unac_entities($string);
         $string =~ s/ð/d/g;  
         $string =~ s/&E[tT][hH];/D/g;  
         $string =~ s/&(\w\w)lig;/$1/gi;  
68          return lc($string);          return lc($string);
69  }  }
70    
71    sub unac_entities {
72            my $ent = shift || return;
73    
74            $ent =~ s/&(\w)(acute|cedil|circ|grave|ring|slash|tilde|uml);/$1/gi;
75            $ent =~ s/ð/d/g;
76            $ent =~ s/&E[tT][hH];/D/g;
77            $ent =~ s/&(\w\w)lig;/$1/gi;
78    
79            return $ent;
80    }
81    
82  # create WebPAC object  # create WebPAC object
83  #  #
84  my $webpac = new WebPAC(  my $webpac = new WebPAC(

Legend:
Removed from v.549  
changed lines
  Added in v.550

  ViewVC Help
Powered by ViewVC 1.1.26