in reply to Re^2: binmode(':encoding(UTF-8)') did not produce utf8 for me
in thread binmode(':encoding(UTF-8)') did not produce utf8 for me
That has nothing to do with Perl. That's PowerShell doing that. You can control the output as follows:
script | Out-File -Encoding UTF-8 file.out
The above outputs a BOM. The following doesn't, but requires PS6+
script | Out-File -Encoding UTF8NoBOM file.out
That said, -Encoding UTF8NoBOM is the default with PS6+, so all you need is the following if you're using PS6+:
script >file.out
So the issue is really that you are using an outdated PowerShell.
References:
|
---|