Bug 11944: Fix encoding issue for the "Did you mean" feature
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 16 Apr 2014 09:10:34 +0000 (11:10 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 13 Jan 2015 16:07:26 +0000 (13:07 -0300)
Test plan:
1/ Go on admin/didyoumean.pl and enable the feature for the OPAC
2/ Generate and use the french templates
3/ Launch a search at the OPAC
4/ You should see correctly encoded message

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Koha/SuggestionEngine/Plugin/ExplodedTerms.pm

index c0c6166..b4bacbc 100644 (file)
@@ -88,9 +88,7 @@ sub get_suggestions {
         $thissearch = "$index=$thissearch"
           unless ( $thissearch =~ s/OP!/$index=/g );
         $template->{VARS}->{index} = $index;
-        my $label = pack("U0a*", $template->output); #FIXME: C4::Templates is
-        # returning incorrectly-marked UTF-8. This fixes the problem, but is
-        # an annoying workaround.
+        my $label = $template->output;
         push @results,
         {
             'search'  => $thissearch,