You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f9ecee4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): decode Windows CLI output written in the ANSI code page
Python CLIs such as az are not in UTF-8 mode, so their piped stdout is encoded in the system ANSI code page. Every non-ASCII character in Azure DevOps PR titles, descriptions and comments rendered as U+FFFD because process output was decoded as UTF-8 only.
Decode a buffer that is not valid UTF-8 with the ANSI code page the host reports, for the commands that opt in: ProcessRunInput.windowsAnsiOutput, set by the Azure DevOps CLI. A UTF-8 tool with a stray legacy byte, such as a git diff over a latin-1 file, keeps its text and its replacement characters. A truncated buffer has its cut multi-byte tail ignored before the encoding is judged, so long ANSI output still decodes. The code page query runs %SystemRoot%\System32\reg.exe rather than a bare reg, so the current directory cannot supply the executable.
0 commit comments