- else {
- my $compile_cmd;
- my $pl2c = "$testswitch -I../lib ../utils/perlcc --testsuite " .
- # -O9 for good measure, -fcog is broken ATM
- "$switch -Wb=-O9,-fno-cog -L .. " .
- "-I \".. ../lib/CORE\" $args $utf8 $test -o ";
-
- if( $^O eq 'MSWin32' ) {
- $test_executable = "$test.exe";
- # hopefully unused name...
- open HACK, "> xweghyz.pl";
- print HACK <<EOT;
-#!./perl
-
-open HACK, '.\\perl $pl2c $test_executable |';
-# cl.exe prints the name of the .c file on stdout (\%^\$^#)
-while(<HACK>) {m/^\\w+\\.[cC]\$/ && next;print}
-open HACK, '$test_executable |';
-while(<HACK>) {print}
-EOT
- close HACK;
- $compile_cmd = 'xweghyz.pl |';
- }
- else {
- $test_executable = "$test.plc";
- $compile_cmd
- = "./perl $pl2c $test_executable && $test_executable |";
- }
- unlink $test_executable if -f $test_executable;
- open(RESULTS, $compile_cmd)
- or print "can't compile '$compile_cmd': $!.\n";
- }
+ # Our environment may force us to use UTF-8, but we can't be sure that
+ # anything we're reading from will be generating (well formed) UTF-8
+ # This may not be the best way - possibly we should unset ${^OPEN} up
+ # top?
+ binmode RESULTS;