Bugzilla – Attachment 52233 Details for
Bug 16578
Wide character warning in opac-export.pl when utf8 chosen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16578: Fix wide character errors in opac-export.pl
Bug-16578-Fix-wide-character-errors-in-opac-export.patch (text/plain), 2.21 KB, created by
Jonathan Druart
on 2016-06-10 14:41:04 UTC
(
hide
)
Description:
Bug 16578: Fix wide character errors in opac-export.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-10 14:41:04 UTC
Size:
2.21 KB
patch
obsolete
>From 32d129bdbd883982a05d972470bce2adf08f2796 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 24 May 2016 14:28:44 -0300 >Subject: [PATCH] Bug 16578: Fix wide character errors in opac-export.pl >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This simple patch fixes wide character warning raised by opac-export.pl when >'MARC (Unicode/UTF-8)' and 'MARC (Unicode/UTF-8, Standard)' formats are chosen for downloading records. > >To test: >- Have records indexed >- Open your OPAC logs: > $ tail -f /var/log/koha/kohadev/opac-error.log >- Open the detail page in the opac for a record >- Choose Save record > MARC (Unicode/UTF-8) >=> FAIL: opac-export.pl: Wide character in print at /home/vagrant/kohaclone/opac/opac-export.pl line 116., referer: http://localh... >- Choose Save record > MARC (Unicode/UTF-8, Standard) >=> FAILE opac-export.pl: Wide character in print... >- Apply the patch >- Choose Save record > MARC (Unicode/UTF-8) >=> SUCCESS: No warnings raised. >- Choose Save record > MARC (Unicode/UTF-8, Standard) >=> SUCCESS: No warnings raised. >- Sign off :-D > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-export.pl | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/opac/opac-export.pl b/opac/opac-export.pl >index c4ab83a..3f32d1a 100755 >--- a/opac/opac-export.pl >+++ b/opac/opac-export.pl >@@ -17,8 +17,7 @@ > # You should have received a copy of the GNU General Public License > # along with Koha; if not, see <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >+use Modern::Perl; > > use C4::Record; > use C4::Auth; >@@ -107,11 +106,15 @@ else { > -charset => 'utf-8', > -attachment => "bib-$biblionumber.txt" > ); >- }else{ >+ } else { >+ binmode STDOUT, ':encoding(UTF-8)'; > print $query->header( > -type => 'application/octet-stream', >- -charset=>'utf-8', >- -attachment=>"bib-$biblionumber.$format"); >+ -charset => 'utf-8', >+ -attachment => "bib-$biblionumber.$format" >+ ); > } > print $marc; > } >+ >+1; >-- >2.8.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 16578
:
51743
|
51774
|
51798
|
51888
| 52233 |
52234