Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Agent gh pr create --body-file corrupts Unicode on Windows
Environment
- OS: Windows 10/11
- Shell: PowerShell
- Tooling: Cursor Agent ran
gh pr create --repo ¡ --body-file .pr-body-tmp.md
Expected
PR description on GitHub matches the markdown file (e.g. #2 ¡ª Upgrade, job ¡ª vcpkg, Arc ¡ú ArcShape).
Actual
Non-ASCII punctuation in the body file was stored on GitHub as replacement characters ``:
¡ª(U+2014 EM DASH) ¡ú ``¡ú(U+2192 RIGHTWARDS ARROW) ¡ú ``
Example from a real PR:
**Depends on:** [#2 Upgrade txiki to v26.5.0](...)
instead of:
**Depends on:** [#2 ¡ª Upgrade txiki to v26.5.0](...)
Steps to reproduce
- On Windows, have the agent write a PR body file containing Unicode punctuation (
¡ª,¡ú, etc.). - Run
gh pr create --body-file <path>. - Open the PR on GitHub and inspect the description.
Workaround
- Use ASCII-only in PR bodies when the agent uses
--body-fileon Windows (-instead of¡ª,toinstead of¡ú). - Or ensure UTF-8 end-to-end (e.g. UTF-8 with BOM for the body file,
chcp 65001,[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new()beforegh).
Suggestion
When the agent writes temp files for gh on Windows, either force UTF-8 with BOM or avoid Unicode in generated PR/commit bodies unless encoding is verified through the full pipeline (Write tool ¡ú disk ¡ú gh ¡ú GitHub API).
Steps to Reproduce
- On Windows, have the agent write a PR body file containing Unicode punctuation (
—,→, etc.). - Run
gh pr create --body-file <path>. - Open the PR on GitHub and inspect the description.
Expected Behavior
PR description on GitHub matches the markdown file (e.g. #2 — Upgrade, job — vcpkg, Arc → ArcShape).
Operating System
Windows 10/11
Version Information
Version: 3.6.21 (system setup)
VS Code Extension API: 1.105.1
Commit: e7a7e93f4d75f8272503ecf33cedbaae10114a10
Date: 2026-05-28T21:45:36.072Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.220
OS: Windows_NT x64 10.0.26100
Does this stop you from using Cursor
No - Cursor works, but with this issue