Skip to content

Read install-time metadata files as UTF-8 - #10646

Open
lazerg wants to merge 2 commits into
aws:v2from
lazerg:fix-install-json-encoding
Open

lazerg wants to merge 2 commits into
aws:v2from
lazerg:fix-install-json-encoding

Conversation

@lazerg

@lazerg lazerg commented Sep 16, 2026

Copy link
Copy Markdown

Issue #, if available: #10645

Description of changes: On a Korean Windows install whose profile directory contains Hangul, every command fails at startup with 'cp949' codec can't decode byte 0x80. The install script writes awscli/data/install.json as UTF-8 and records the install path in it, but get_distribution_source() opens that file with the locale's default encoding, which is cp949 there. It runs on every invocation while building the user agent, so even aws --version dies before doing anything. aws update reads the same file the same way.

Both readers now pass encoding='utf-8', matching how the file is written.

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

@lazerg
lazerg requested a review from a team as a code owner September 16, 2026 06:04
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.

1 participant