Bugzilla – Attachment 94616 Details for
Bug 13937
Add an Elasticsearch-compatible Z39.50/SRU daemon
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13937: (follow-up) Fix searching with UTF-8 characters.
Bug-13937-follow-up-Fix-searching-with-UTF-8-chara.patch (text/plain), 2.96 KB, created by
Ere Maijala
on 2019-10-23 13:32:23 UTC
(
hide
)
Description:
Bug 13937: (follow-up) Fix searching with UTF-8 characters.
Filename:
MIME Type:
Creator:
Ere Maijala
Created:
2019-10-23 13:32:23 UTC
Size:
2.96 KB
patch
obsolete
>From 9f9a752d807065695405def731808b3d8d66351d Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Wed, 23 Oct 2019 16:23:19 +0300 >Subject: [PATCH] Bug 13937: (follow-up) Fix searching with UTF-8 characters. > >--- > Koha/Z3950Responder/RPN.pm | 1 + > t/db_dependent/Koha/Z3950Responder/GenericSession.t | 7 ++++--- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/Koha/Z3950Responder/RPN.pm b/Koha/Z3950Responder/RPN.pm >index 403bb78228..a1bfeff7eb 100644 >--- a/Koha/Z3950Responder/RPN.pm >+++ b/Koha/Z3950Responder/RPN.pm >@@ -45,6 +45,7 @@ sub to_koha { > my $prefix = ''; > my $suffix = ''; > my $term = $self->{'term'}; >+ utf8::decode($term); > > if ($attrs) { > foreach my $attr (@$attrs) { >diff --git a/t/db_dependent/Koha/Z3950Responder/GenericSession.t b/t/db_dependent/Koha/Z3950Responder/GenericSession.t >index 8fe69704cc..5f0a18d7b1 100644 >--- a/t/db_dependent/Koha/Z3950Responder/GenericSession.t >+++ b/t/db_dependent/Koha/Z3950Responder/GenericSession.t >@@ -1,6 +1,7 @@ > #!/usr/bin/perl > > use Modern::Perl; >+use utf8; > > use Test::More tests => 3; > use Test::WWW::Mechanize; >@@ -74,7 +75,7 @@ subtest 'test_search' => sub { > $search->mock('simple_search_compat', sub { > my ( $self, $query ) = @_; > >- return ('unexpected query', undef, 0) unless $query eq '((author:(author)) AND ((title:(title\(s\))) OR (title:(another))))'; >+ return ('unexpected query', undef, 0) unless $query eq '((author:(author)) AND ((title:(title\(s\))) OR (title:(speciäl))))'; > > my @records = ($marc_record_1, $marc_record_2); > return (undef, \@records, 2); >@@ -103,7 +104,7 @@ subtest 'test_search' => sub { > $Zconn->connect('localhost:42111', 0); > is($Zconn->errcode(), 0, 'Connection is successful: ' . $Zconn->errmsg()); > >- my $rs = $Zconn->search_pqf('@and @attr 1=1 @attr 4=1 author @or @attr 1=4 title(s) @attr 1=4 another'); >+ my $rs = $Zconn->search_pqf('@and @attr 1=1 @attr 4=1 author @or @attr 1=4 title(s) @attr 1=4 speciäl'); > is($Zconn->errcode(), 0, 'Search is successful: ' . $Zconn->errmsg()); > > is($rs->size(), 2, 'Two results returned'); >@@ -132,7 +133,7 @@ subtest 'test_search' => sub { > @nodes = $dom->getElementsByTagNameNS($ns, 'diagnostics'); > is(scalar(@nodes), 1, 'diagnostics returned for bad query'); > >- $agent->get_ok("$base/biblios?operation=searchRetrieve&recordSchema=marcxml&version=1.1&maximumRecords=10&query=(dc.author%3dauthor AND (dc.title%3d\"title(s)\" OR dc.title%3danother))", 'Retrieve search results'); >+ $agent->get_ok("$base/biblios?operation=searchRetrieve&recordSchema=marcxml&version=1.1&maximumRecords=10&query=(dc.author%3dauthor AND (dc.title%3d\"title(s)\" OR dc.title%3dspeciäl))", 'Retrieve search results'); > $dom = XML::LibXML->load_xml(string => $agent->content()); > @nodes = $dom->getElementsByTagNameNS($ns, 'searchRetrieveResponse'); > is(scalar(@nodes), 1, 'searchRetrieveResponse returned'); >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13937
:
46369
|
47417
|
47418
|
47419
|
53503
|
58122
|
58125
|
58126
|
59443
|
59444
|
60735
|
60736
|
60737
|
60738
|
66943
|
66944
|
66945
|
66946
|
69139
|
82562
|
82563
|
82564
|
82565
|
82566
|
82567
|
82589
|
82590
|
82591
|
82592
|
82593
|
82594
|
82595
|
82660
|
82661
|
82662
|
82663
|
82664
|
82665
|
82666
|
82667
|
83780
|
83781
|
83782
|
83783
|
83784
|
83785
|
83786
|
83787
|
83788
|
83789
|
83951
|
83952
|
83953
|
83954
|
83955
|
83956
|
83957
|
83958
|
83959
|
84050
|
84051
|
84052
|
84053
|
84054
|
84055
|
84056
|
84057
|
84058
|
84059
|
84062
|
84063
|
84064
|
84065
|
84066
|
84067
|
84068
|
84069
|
84072
|
84073
|
85112
|
86353
|
86354
|
86355
|
86356
|
86357
|
86358
|
86359
|
86360
|
86361
|
86362
|
86363
|
86364
|
88907
|
88908
|
88909
|
88910
|
88911
|
88912
|
88913
|
88914
|
88915
|
88916
|
88917
|
88918
|
91728
|
91729
|
91730
|
91731
|
91732
|
91733
|
91734
|
91735
|
91736
|
91737
|
91738
|
91739
|
91740
|
93913
|
94097
|
94109
|
94110
|
94209
| 94616 |
94647