Bug 6752: Be stricter with utf-8 encoding of output
authorColin Campbell <colin.campbell@ptfs-europe.com>
Wed, 6 Jul 2011 07:24:28 +0000 (08:24 +0100)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Mon, 20 Feb 2012 02:37:10 +0000 (21:37 -0500)
commit54662479c3ba62fde4f606555cf2bf66fe0663e6
tree595f812554944a419fa004cf93b4f5272ebe48af
parent937ccea736c28a7d0b0d05850fa365af6c42c40f
Bug 6752: Be stricter with utf-8 encoding of output

use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 263dded818da9d3ad0fa702f7bc848707e181211)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
(cherry picked from commit 960da426a876891a04523c11239ccd04e85c6676)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
17 files changed:
admin/aqplan.pl
authorities/authorities-list.pl
misc/cronjobs/MARC21_parse_test.pl
misc/cronjobs/overdue_notices.pl
misc/migration_tools/22_to_30/export_Authorities_xml.pl
misc/migration_tools/bulkmarcimport.pl
misc/migration_tools/rebuild_zebra.pl
misc/sax_parser_test.pl
misc/translator/xgettext.pl
opac/ilsdi.pl
opac/oai.pl
reports/guided_reports.pl
reports/serials_stats.pl
svc/bib
svc/new_bib
t/db_dependent/lib/KohaTest.pm
tools/export.pl