.NET Core HelloWorld does not work with non-ASCII Windows user names
See original GitHub issueDescribe the bug
When I follow the documentation to create and deploy a .NET Core SAM sample application, deploying the application fails with the error message
Error: DotnetCliPackageBuilder:RunPackageAction - 'utf-8' codec can't decode byte 0x94 in position 1322: invalid start byte
This is presumable due to my Windows user name (Stefan.Götz) or user home directory containing a non-ASCII character and it not being properly UTF-8 encoded.
To Reproduce
Steps to reproduce the behavior:
- Install VSCode, AWS Toolkit, .NET Core as per documentation
 - In VSCode, run “AWS: Create new SAM Application”
 - In VSCode, run “AWS: Deploy SAM Application”
 - See error
 
Expected behavior
Would expect the sample SAM application to be deployed successfully (this works for me with a Python sample application).
Screenshots
Logs:
2020-06-10 15:47:47 [INFO]: Retrieving AWS endpoint data
2020-06-10 15:47:47 [INFO]: OS:  Windows_NT x64 10.0.18363
Visual Studio Code Version:  1.45.1
AWS Toolkit Version:  1.10.0
2020-06-10 15:48:14 [INFO]: Running command: C:\Program Files\Amazon\AWSSAMCLI\bin\sam.cmd --info
2020-06-10 15:48:28 [INFO]: Starting SAM Application deployment...
2020-06-10 15:48:28 [INFO]: Building SAM Application...
2020-06-10 15:48:28 [INFO]: Running command: C:\Program Files\Amazon\AWSSAMCLI\bin\sam.cmd build --build-dir C:\Users\STEFAN~1.GTZ\AppData\Local\Temp\aws-toolkit-vscode\samDeploynTnqGI\build --template c:\cygwin64\tmp\dev-sgotz-sam-cs-hello-world\dev-sgotz-sam-cs-hello-world\template.yaml
2020-06-10 15:48:36 [ERROR]: Unexpected exitcode (1), expecting (0)
2020-06-10 15:48:36 [ERROR]: Error: undefined
2020-06-10 15:48:36 [ERROR]: stderr: Building function 'HelloWorldFunction'
,Running DotnetCliPackageBuilder:GlobalToolInstall
,
,Tool 'amazon.lambda.tools' was reinstalled with the latest stable version (version '4.0.0').
,Running DotnetCliPackageBuilder:RunPackageAction
,Error: DotnetCliPackageBuilder:RunPackageAction - 'utf-8' codec can't decode byte 0x94 in position 1322: invalid start byte
2020-06-10 15:48:36 [ERROR]: stdout: Build Failed
2020-06-10 15:48:36 [ERROR]: [Error: Error with child process: Building function 'HelloWorldFunction'
,Running DotnetCliPackageBuilder:GlobalToolInstall
,
,Tool 'amazon.lambda.tools' was reinstalled with the latest stable version (version '4.0.0').
,Running DotnetCliPackageBuilder:RunPackageAction
,Error: DotnetCliPackageBuilder:RunPackageAction - 'utf-8' codec can't decode byte 0x94 in position 1322: invalid start byte
	at Object.t.logAndThrowIfUnexpectedExitCode (c:\Users\Stefan.Götz\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-1.10.0\dist\extension.js:2:492849)
	at t.SamCliBuildInvocation.<anonymous> (c:\Users\Stefan.Götz\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-1.10.0\dist\extension.js:2:1239517)
	at Generator.next (<anonymous>)
	at o (c:\Users\Stefan.Götz\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-1.10.0\dist\extension.js:2:1237747)
	at processTicksAndRejections (internal/process/task_queues.js:85:5)]
2020-06-10 15:48:36 [ERROR]: An error occurred while deploying a SAM Application. Check the logs for more information by running the "View AWS Toolkit Logs" command from the Command Palette.
2020-06-10 15:52:49 [INFO]: Successfully sent a telemetry batch of 14
2020-06-10 15:57:50 [INFO]: Successfully sent a telemetry batch of 2
Desktop (please complete the following information):
OS: Windows_NT x64 10.0.18363 Visual Studio Code Version: 1.45.1 AWS Toolkit Version: 1.10.0
Issue Analytics
- State:
 - Created 3 years ago
 - Comments:6 (3 by maintainers)
 

Top Related StackOverflow Question
SAM CLI v1.2.0 released yesterday including this fix
Child issue resolved. https://github.com/aws/aws-sam-cli/issues/2031