# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
+
use C4::Context;
use MARC::Record;
use C4::Search;
}
}
$key = _normalize($key);
+ if ($component->{'length'}){
+ if (length($key) > $component->{'length'}){
+ $key = _normalize(substr($key,$component->{'offset'},$component->{'length'}));
+ }
+ }
}
if ($i == 0) {
push @keys, $key if $key;
# FIXME - default normalizer
sub _normalize {
my $value = uc shift;
+ $value =~ s/[.;:,\]\[\)\(\/'"]//g;
$value =~ s/^\s+//;
- $value =~ s/^\s+$//;
+ #$value =~ s/^\s+$//;
+ $value =~ s/\s+$//;
$value =~ s/\s+/ /g;
- $value =~ s/[.;,\]\[\)\(\/"']//g;
+ #$value =~ s/[.;,\]\[\)\(\/"']//g;
return $value;
}