How a cp932 Encoding Bug Crashed Builds on Japanese Windows but Not on Mac
A character encoding mismatch between UTF-8 and cp932 caused a build pipeline to crash on Japanese-locale Windows machines while working perfectly on macOS. The issue arose because Python defaults to the platform's locale encoding when capturing subprocess output, meaning emoji-containing strings that pass freely under UTF-8 trigger a UnicodeEncodeError under cp932. In this case, a build script shelled out to a version-checking tool whose success message included emoji, which cp932 cannot encode, causing the subprocess to crash. The build script then misreported the failure as a version-consistency error, obscuring the root cause and wasting debugging time. To prevent recurrence, a dedicated test file was created to statically check scripts for cp932-unsafe characters on macOS before code reaches Windows.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in