Re: help wanted for DPNhtml2mail.pl: deprecated encoding pragma with perl 5.26
-=| Cédric Boutillier, 03.03.2018 13:57:24 +0100 |=-
> In the publicity team, we have some problems with a Perl script we use.
> A warning about encoding was transformed to fatal error with perl 5.26.
> Since this script is used to convert announcements from the website to
> emails, we will soon need it for the release of 9.4.
>
> Please see the details below, and keep the debian-publicity in copy of
> the mail for your appreciated expertise.
I think that replacing
use encoding 'utf-8';
with
use utf8::all;
(packaged as libutf8-all-perl, available since oldoldstable)
That also turns utf-8 semantics on @ARGV, all other file handles and
several other OS interfaces. I would give it a try, though, since it
is just one line and probably what you want in the long term.
Alternatively, you may want to use
use utf8;
binmode(STDIN, 'utf-8');
binmode(STDOUT, 'utf-8');
HTH,
dam
Reply to: