Fix file output encoding for windows.

Powershell uses the system encoding when saving the test runner stdout.
This change forces the use of utf-8 encoding for the entire powershell
script execution.

Bug: https://github.com/flutter/flutter/issues/143162
Change-Id: Id73fc9e0d031037a393a4358abb98432873bdf3f
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/56720
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Ricardo Amador <ricardoamador@google.com>
diff --git a/recipe_modules/test_utils/resources/runner.ps1 b/recipe_modules/test_utils/resources/runner.ps1
index 3e54946..82a00b1 100644
--- a/recipe_modules/test_utils/resources/runner.ps1
+++ b/recipe_modules/test_utils/resources/runner.ps1
@@ -1,3 +1,4 @@
+[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
 Write-Host "$args"
 $cmd=""
 ForEach ($arg in $args) {
@@ -9,5 +10,5 @@
   }
 }
 Write-Host $cmd
-iex $cmd | Set-Content $Env:LOGS_FILE -Passthru
-exit $LASTEXITCODE
\ No newline at end of file
+iex $cmd | Set-Content $Env:LOGS_FILE -Encoding UTF8 -Passthru
+exit $LASTEXITCODE