Bug 13975: Remove compilation warning about encoding pragma deprecation

Test plan:
0/ Does not apply the patch
1/ Launch the export_borrowers.pl script to export data with unicode characters
 % perl misc/export_borrowers.pl -w "borrowernumber=42" --field borrowernumber --field surname --field firstname
  Use of the encoding pragma is deprecated at misc/export_borrowers.pl
  7874,JOUBU,صةصةصة
2/ Apply this patch
3/ Repeat 1
 % perl misc/export_borrowers.pl -w "borrowernumber=42" --field borrowernumber --field surname --field firstname
  7874,JOUBU,صةصةصة

Note that the deprecated message is gone and the encoding is correct.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

  I confirm the warning (on Perl version above 5.14). And that the patch fix
  the warning.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Jonathan Druart 2015-04-09 16:05:59 +02:00 committed by Tomas Cohen Arazi
parent 3e3559e763
commit dbd8602280
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ use Getopt::Long qw(:config no_ignore_case);
use C4::Context;
use C4::Members;
use encoding 'utf8';
binmode STDOUT, ":encoding(UTF-8)";
sub print_usage {
( my $basename = $0 ) =~ s|.*/||;