Bugzilla – Attachment 27596 Details for
Bug 11944
Cleanup Koha UTF-8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11944: Fix encoding issue on searching
Bug-11944-Fix-encoding-issue-on-searching.patch (text/plain), 2.35 KB, created by
Jonathan Druart
on 2014-04-25 09:46:11 UTC
(
hide
)
Description:
Bug 11944: Fix encoding issue on searching
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-04-25 09:46:11 UTC
Size:
2.35 KB
patch
obsolete
>From 573ac3943ac286e8f574ed255e4617a7a3c94090 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 17 Mar 2014 15:13:27 +0100 >Subject: [PATCH] Bug 11944: Fix encoding issue on searching > >The search patch should fix non-latin character searches. > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >--- > C4/Search.pm | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 8225460..3e01dff 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -36,7 +36,6 @@ use URI::Escape; > use Business::ISBN; > use MARC::Record; > use MARC::Field; >-use Encode qw( decode is_utf8 ); > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); > > # set the version for version checking >@@ -1738,6 +1737,8 @@ sub searchResults { > : $bibliotag < 10 > ? GetFrameworkCode($marcrecord->field($bibliotag)->data) > : GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); >+ >+ SetUTF8Flag($marcrecord); > my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); > $oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); > $oldbiblio->{result_number} = $i + 1; >@@ -1788,12 +1789,7 @@ sub searchResults { > if($marcrecord->field($1)){ > my @repl = $marcrecord->field($1)->subfield($2); > my $subfieldvalue = $repl[$i]; >- >- if (! Encode::is_utf8($subfieldvalue)) { >- $subfieldvalue = Encode::decode('UTF-8', $subfieldvalue); >- } >- >- $newline =~ s/\[$tag\]/$subfieldvalue/g; >+ $newline =~ s/\[$tag\]/$subfieldvalue/g; > } > } > $newsummary .= "$newline\n"; >@@ -2033,9 +2029,6 @@ sub searchResults { > } > > # XSLT processing of some stuff >- use C4::Charset; >- SetUTF8Flag($marcrecord); >- warn $marcrecord->as_formatted if $DEBUG; > my $interface = $search_context eq 'opac' ? 'OPAC' : ''; > if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { > $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); >-- >1.7.10.4
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 11944
:
26364
|
26365
|
26366
|
26367
|
26368
|
26369
|
26370
|
26371
|
26372
|
26407
|
26408
|
26409
|
26737
|
26738
|
26739
|
26740
|
26741
|
26742
|
26743
|
26744
|
26745
|
26746
|
26747
|
26748
|
26794
|
26857
|
26858
|
26859
|
26860
|
26861
|
26862
|
26863
|
26864
|
26865
|
26866
|
26867
|
26868
|
26869
|
26870
|
26871
|
26895
|
26921
|
27021
|
27080
|
27094
|
27158
|
27159
|
27161
|
27193
|
27194
|
27195
|
27196
|
27198
|
27199
|
27200
|
27201
|
27202
|
27203
|
27204
|
27205
|
27206
|
27207
|
27208
|
27209
|
27210
|
27211
|
27212
|
27213
|
27214
|
27215
|
27216
|
27585
|
27586
|
27587
|
27588
|
27589
|
27590
|
27591
|
27592
|
27593
|
27594
|
27595
|
27596
|
27597
|
27598
|
27599
|
27600
|
27601
|
27602
|
27603
|
27880
|
27881
|
27882
|
27883
|
27884
|
27885
|
27886
|
27887
|
27888
|
27889
|
27890
|
27891
|
27892
|
27893
|
27894
|
27895
|
27896
|
27897
|
27898
|
28046
|
28047
|
28048
|
28049
|
28050
|
28051
|
28052
|
28053
|
28054
|
28055
|
28056
|
28057
|
28058
|
28059
|
28060
|
28061
|
28062
|
28063
|
28064
|
28065
|
28066
|
28097
|
28245
|
28246
|
28247
|
28248
|
28249
|
28250
|
28251
|
28252
|
28253
|
28732
|
29981
|
29982
|
29983
|
29984
|
29985
|
29986
|
29987
|
29988
|
29989
|
29990
|
29991
|
29992
|
29993
|
29994
|
29995
|
29996
|
29997
|
29998
|
29999
|
30000
|
30001
|
30002
|
30003
|
30004
|
30005
|
30006
|
30012
|
30016
|
30945
|
31299
|
35223
|
35224
|
35225
|
35226
|
35227
|
35228
|
35229
|
35230
|
35231
|
35232
|
35233
|
35234
|
35235
|
35236
|
35237
|
35238
|
35239
|
35240
|
35241
|
35242
|
35243
|
35244
|
35245
|
35246
|
35247
|
35248
|
35249
|
35250
|
35251
|
35252
|
35253