Skip to content

Resolving Windows file encoding issues #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
2 commits merged into from Jul 21, 2021
Merged

Resolving Windows file encoding issues #343

2 commits merged into from Jul 21, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jun 21, 2021

Issue #, if available:

aws/aws-cdk#15066

Description of changes:

Windows > redirect operator (an alias for the PowerShell cmdlet 'Out-File') defaults to UTF-16LE encoding as per the documentation.

The CDK expects templates fed to it with the --template CLI flag to be UTF-8 encoded, so grabbing the template according to the current docs will technically download the template file but prevent you from doing anything further with it using the CDK.

Proposing we add separation for Mac/Linux and Windows so that we can explicitly enforce utf-8 encoding for the Windows Out-File cmdlet.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ghost
Copy link
Author

ghost commented Jun 28, 2021

Added call to powershell.exe to ensure this works with regular cmd windows too.

@ghost
Copy link

ghost commented Jul 21, 2021

Thanks for the contribution! Merging.

@ghost ghost closed this Jul 21, 2021
@ghost ghost reopened this Jul 21, 2021
@ghost ghost merged commit 086ae23 into awsdocs:main Jul 21, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants