in reply to Re: Matching non-ASCII file contents with file name.
in thread Matching non-ASCII file contents with file name.
Thanks, again!
I see now the mistake but don't understand it. The following is what I had but which was not producing the right result:
my ($fh, $tempfile) = tempfile(); binmode( $fh, ":utf8" );
With your corrections, the following produces the right character:
my ($fh, $tempfile) = tempfile(); binmode( $fh, ":encoding(UTF-8)" );
What would be the difference between binmode( $fh, ":utf8" ); and binmode( $fh, ":encoding(UTF-8)" ); in regards to the output? I don't understand the difference.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Matching non-ASCII file contents with file name.
by Corion (Patriarch) on Dec 23, 2022 at 07:16 UTC | |
by hippo (Archbishop) on Dec 23, 2022 at 08:26 UTC |