remove all accents from pager links
[webpac] / my_unac_string.pm
1 # Alternative implementation for unac_string which supports charasters in
2 # Croatian language which isn't really accented (ð) but needs to be coverted
3 # to unaccented equivalent (d)
4
5 use Text::Unaccent 1.02;        # 1.01 won't compile on my platform,
6
7 sub my_unac_string {
8         my $charset = shift || return;
9         my $string = shift || return;
10         $string = unac_string($charset,$string);
11         $string =~ tr/ðÐ/dD/;
12         $string =~ s#&(\w)(acute|cedil|circ|grave|ring|slash|tilde|uml);#$1#gi;
13         return $string;
14 }
15
16 1;