in reply to Wide character at C:\perl-lib-ctp/Fmsc.pm line 27, <INFILE> line 1.
These two lines in combination make little sense:
open INFILE, "<:utf8" , $infilename || die ("can't open $infilena +me") ; while (my $line = decode_utf8(<INFILE>)) { }
The first line already tells Perl to decode the lines in INFILE as UTF-8 bytes.
The second line tries to decode again.
I would lose the second line and rewrite it as:
open INFILE, "<:utf8" , $infilename || die ("can't open $infilena +me") ; @lines = <INFILE>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Wide character at C:\perl-lib-ctp/Fmsc.pm line 27, <INFILE> line 1.
by Fletch (Bishop) on Dec 26, 2021 at 14:30 UTC | |
|
Re^2: Wide character at C:\perl-lib-ctp/Fmsc.pm line 27, <INFILE> line 1.
by Anonymous Monk on Dec 26, 2021 at 16:53 UTC | |
by frank5us (Initiate) on Dec 26, 2021 at 23:04 UTC | |
|
Re^2: Wide character at C:\perl-lib-ctp/Fmsc.pm line 27, <INFILE> line 1.
by frank5us (Initiate) on Dec 26, 2021 at 22:55 UTC |