Why do files generated by Cursor constantly have encoding issues? It’s extremely frustrating. Is the Cursor team working on fixing this?

Describe the Bug

I’ve encountered a serious problem while using Cursor over the past two weeks. Newly generated files frequently turn out garbled due to encoding errors. I have to ask the AI to revise them repeatedly every time. I thought fixing it once would solve the issue, yet the same problem keeps happening almost every single time. It is really annoying and such a waste of tokens. I would like to know if the Cursor team is even aware of this bug.

Steps to Reproduce

Basically every time I generate a new file, it results in garbled text due to encoding errors

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.0.12 (user setup)
VSCode Version: 1.105.1
Commit: a80ff7dfcaa45d7750f6e30be457261379c29b00
Date: 2026-04-04T00:13:18.452Z
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?

Auto

Does this stop you from using Cursor

No - Cursor works, but with this issue

This is a known bug with the agent Write and StrReplace tools. If the tool-call arguments include non-ASCII characters, the file gets written with the wrong encoding on some systems, like on Chinese Windows it uses GBK instead of UTF-8. Users with Chinese, Korean, Japanese, and Turkish locales can reproduce it.

We’ve logged the issue and we’re tracking it, but I can’t share an ETA for a fix yet. Version 3.0.12 is fairly old, but the bug is still present in recent builds too, so updating alone won’t help.

A few related threads with discussion and temporary workarounds: