Uh oh!
There was an error while loading. Please reload this page.
fix(installer): pin -Encoding UTF8 on install-log writes - #591
Conversation
Set-Content/Add-Content default to PS 5.1's ANSI encoding, corrupting non-ASCII host paths/messages in the -Diagnose log; every other writer in this file already pins -Encoding UTF8. (Bugbot on the staging promotion, backend#1497 sibling.)
Resolves the install-k8s.ps1 + manifest.sha256 conflict from #588 (graceful error boundary). Re-applies the two -Encoding UTF8 edits to the log writers on top of develop and regenerates the R8 manifest hash.
Re-resolves the recurring install-k8s.ps1 + manifest conflict; re-applies the two -Encoding UTF8 log-writer edits on develop's tip and regenerates the R8 manifest.
saqlainsyed007
left a comment
There was a problem hiding this comment.
Approving — clean, low-risk fix. I recomputed the SHA-256 of the new install-k8s.ps1 and it matches the updated manifest.sha256 line exactly, and the old hash isn't pinned anywhere else, so the bootstrap integrity check stays green. The ANSI→UTF-8 change correctly fixes the non-ASCII corruption and is consistent with the file's other -Encoding UTF8 writers.
One non-blocking note left inline.
Uh oh!
There was an error while loading. Please reload this page.
…591) Set-Content -Encoding UTF8 prepends a BOM on PowerShell 5.1, so the log started with EF BB BF. Use the file's own no-BOM writer ([System.IO.File]::WriteAllText with UTF8Encoding($false)); the Add-Content append path was already BOM-free. Regenerates the R8 manifest hash.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 235fca6. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…s (Bugbot, #591) Start-InstallLog now writes the curated install log as UTF-8 without a BOM, but Edit-Redaction -- which -Diagnose runs over every collected file before zipping, including the copied install-*.log -- still read via `Get-Content -Raw` with no encoding. On Windows PowerShell 5.1 a bare read decodes a BOM-less file as ANSI, so it mangled every non-ASCII host path/message back into mojibake in the bundle operators send: the exact corruption this PR set out to fix. Pin `-Encoding UTF8` on that read. It reads the BOM-less log correctly and still reads the Out-File -Encoding utf8 outputs (which carry a BOM on 5.1) fine -- the BOM is detected and stripped. Regenerated scripts/manifest.sha256 for the new install-k8s.ps1 hash. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LukasWodka
commented
Aug 4, 2026
Fixed the Bugbot finding in Note: this new commit dismissed the prior approval (stale-review dismissal) — @saqlainsyed007 a re-glance when you have a moment. bugbot run |

Bugbot flagged this on the develop→staging promotion (client#589).
Set-Content/Add-Contentfor the curated installer log default to PowerShell 5.1's ANSI encoding, which corrupts non-ASCII host paths/messages in the log operators send with-Diagnose. Every other writer ininstall-k8s.ps1already pins-Encoding UTF8; this makes the two log writers (L161 Add-Content, L590 Set-Content) consistent. No behaviour change otherwise.Note
Low Risk
Installer logging and diagnose packaging only; no cluster install or auth behavior changes.
Overview
Fixes mojibake in the Windows installer’s curated log and
-Diagnosesupport bundle when paths or messages contain non-ASCII characters (#591).Log()now appends with-Encoding UTF8. The install log header is created viaWriteAllTextwith UTF-8 no BOM instead ofSet-Content -Encoding UTF8, which would prepend a BOM on PowerShell 5.1.Edit-Redactionreads collected files with-Encoding UTF8so BOM-less logs decode correctly on PS 5.1.scripts/manifest.sha256is updated forinstall-k8s.ps1.Reviewed by Cursor Bugbot for commit a4b58a7. Bugbot is set up for automated code reviews on this repo. Configure here.