On a fresh install of Windows 11, running Strawberry perl, I'm debugging a script that parses the output of du64
(disk usage). It worked on Win 10 with ActiveState perl.
To debug, I first checked du
, without parameters:
use strict;
my $prog = 'du64.exe'; # Sysinternals
my $st = qx( $prog ); # backtick
for my $i( 0 .. 6 ) { # first few bytes of output
printf "[0x%02X] ", ord( substr( $st, $i, 1 ) );
}
print "...\n";
Output:
[0xFF] [0xFE] [0x0D] [0x00] [0x0A] [0x00] [0x44] ...
(Note FFFE is the byte order mark associated with UTF-16LE, and the perl Encode module confirms this encoding.)
Expected:
[0x0A] [0x44] [0x55] [0x20] [0x76] [0x31] [0x2E] ...