Treat a Polish l as an ASCII l in full-text search feature/fts-polish-l_2_7
authorDan Scott <dscott@laurentian.ca>
Tue, 11 Nov 2014 16:53:24 +0000 (11:53 -0500)
committerDan Scott <dscott@laurentian.ca>
Tue, 11 Nov 2014 16:53:24 +0000 (11:53 -0500)
Is this code path even hit these days? Would have expected
naco_normalize to be poking around here if that was the case...

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/fts.pm

index 429f9d7..504960b 100644 (file)
@@ -24,6 +24,9 @@
         $term =~ s/(\pM+)//gos;
         $term =~ s/(\b\.\b)//gos;
 
+        $term =~ s/\x{142}/l/sgo; # Convert Polish l (lowercase)
+        $term =~ s/\x{141}/l/sgo; # Convert Polish l (uppercase)
+
         # hack to normalize ratio-like strings
         while ($term =~ /\b\d{1}:[, ]?\d+(?:[ ,]\d+[^:])+/o) {
             $term = $` . join ('', split(/[, ]/, $&)) . $';