Agent Write/StrReplace tools output GBK-encoded files on Chinese Windows — persists in 3.0.13 even after ACP changed to 65001

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When I use the agent to generate code, the content in the dialog box is normal, but the generated code file actually contains garbled characters.

Steps to Reproduce

Run the agent to generate the code.
Check the content displayed in the dialog box – it should appear normal and readable.
Save or open the generated code file.
Observe that the code file contains garbled characters instead of the expected code.

Expected Behavior

The code file should be generated in UTF-8 format to ensure that the Chinese characters are not garbled.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.2.11 (user setup)
VSCode Version: 1.105.1
Commit: e9ee1339915a927dfb2df4a836dd9c8337e17cc0
Date: 2026-04-24T14:36:47.933Z
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
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

composer2、gpt-5.4、codex-5.3

For AI issues: add Request ID with privacy disabled

3f0dc9ad-d5e6-42af-b16e-07dc23368d43

Additional Information

I’ve noticed that this issue has been happening for almost a month, and I hope it gets resolved soon. Until it’s fixed, my colleagues and I will likely not subscribe again, as this is a simple but productivity-draining problem. We hope it will be addressed as soon as possible.

Does this stop you from using Cursor

Yes - Cursor is unusable