Hello! The Term::Size-module jumbles up the encoding. How can I fix this?
#!/usr/bin/env perl
use warnings; use strict;
use 5.010;
use utf8;
binmode STDOUT, ':encoding(UTF-8)';
use Term::Size;
my $string = 'Hällö';
say $string;
my $columns = ( Term::Size::chars *STDOUT{IO} )[0];
say $columns;
say $string;
Output:
Hällö
140
H�ll�