/[webpac]/branches/ffzg/my_unac_string.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

Contents of /branches/ffzg/my_unac_string.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 777 - (show annotations)
Tue Sep 16 22:33:48 2008 UTC (15 years, 6 months ago) by dpavlin
File size: 505 byte(s)
local changes
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 no warnings;
9 my $charset = shift || return;
10 my $string = shift || return;
11 $string = unac_string($charset,$string);
12 $string =~ tr/ðÐ/dD/;
13 $string =~ s#&(\w)(acute|cedil|circ|grave|ring|slash|tilde|uml);#$1#gi;
14 return $string;
15 }
16
17 1;

Properties

Name Value
cvs2svn:cvs-rev 1.2

  ViewVC Help
Powered by ViewVC 1.1.26