Alexandr Ciornii
Alexandr Ciornii

Reputation: 7394

Warnings when printing to non-UTF filehandle

I have this code for opening file:

use Encode qw(:fallbacks);    
$PerlIO::encoding::fallback = FB_PERLQQ;
open my $log,'>:encoding(cp-1251)','log.txt';

Some codes do not map to cp-1251 and I see warnings like '"\x{015f}" does not map to cp1251 at ...'. Is it possible to disable this warning for a specific filehandle? \x{015f} in output file is enough for me.

Upvotes: 0

Views: 239

Answers (1)

zoul
zoul

Reputation: 104065

I’d try no warnings 'layer'.

Upvotes: 3

Related Questions