Marc and Sam from Cursor helped with these workarounds that worked for me at least, until the bug is fixed.
-
In Control Panel> Region> Administrative> Change System Locale - check the box for “Beta: Use Unicode UTF-8 for worldwide language support”. For me this overrides the bug with regards to file edits, but not new file creation. The next step after that if that didn’t help with edits (which I didn’t use since the first step worked), was 'Open Workspace Settings (JSON) and add these two settings between the curly braces’:
"files.encoding": "utf8", "files.autoGuessEncoding": false -
They also provided this Cursor Rule language which avoids the buggy write tool.
*“Always create new files using terminal commands (e.g. PowerShell New-Item or echo), never the Write tool. The Write tool has a known encoding bug on Windows that saves files as UTF-16 instead of UTF-8.”
*
This is performing without issue.