Bugzilla – Attachment 142702 Details for
Bug 32012
runreport.pl should use binmode UTF-8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32012: runreport.pl should use binmode UTF-8
Bug-32012-runreportpl-should-use-binmode-UTF-8.patch (text/plain), 1.45 KB, created by
Fridolin Somers
on 2022-10-27 09:48:08 UTC
(
hide
)
Description:
Bug 32012: runreport.pl should use binmode UTF-8
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2022-10-27 09:48:08 UTC
Size:
1.45 KB
patch
obsolete
>From d811a3bc711544b9e752c51a86e39f0038727eab Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 26 Oct 2022 23:15:35 -1000 >Subject: [PATCH] Bug 32012: runreport.pl should use binmode UTF-8 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Like Bug 26832 added binmode UTF-8 to script misc/search_tools/export_elasticsearch_mappings.pl, this should be added to misc/cronjobs/runreport.pl. > >Test plan : >1) Do not apply patch >2) Create a SQL report with : S > SELECT 'accentué',barcode FROM items limit 3 >3) Note the id of this report, for example 1 >4) Run : misc/cronjobs/runreport.pl 1 --format csv | tee /tmp/without.csv >=> You see output with unknown character instead of é : >5) Run : file --mime-type /tmp/without.csv >=> You see : /tmp/without.csv: iso-8859-1 >6) Apply patch >7) Run : misc/cronjobs/runreport.pl 1 --format csv | tee /tmp/with.csv >=> You see correct output with é >8) Run : file --mime-type /tmp/without.csv >=> You see : /tmp/without.csv: utf-8 >--- > misc/cronjobs/runreport.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl >index d6fbb7fcbc..8b3c12b3b0 100755 >--- a/misc/cronjobs/runreport.pl >+++ b/misc/cronjobs/runreport.pl >@@ -164,6 +164,8 @@ Reports - Guided Reports > > =cut > >+binmode STDOUT, ":encoding(UTF-8)"; >+ > # These variables can be set by command line options, > # initially set to default values. > >-- >2.35.5
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 32012
:
142701
|
142702
|
142703
|
142704
|
142986