When cursor updates the code in a source file it frequently (not always) changes the encoding of the updated file from UTF-8 to Central European (Windows).
I do not understand why it changes it to Central European (Windows) because in Settings → Text Editor → Files - The default character set encoding is set to UTF-8.
(For the completeness the source code is in C#.)
Steps to Reproduce
The problem occurs frequently, not always.
Click New Agent and switch to the Plan mode.
Let Cursor create a plan.
Build the plan.
Some of updated files may have changed encoding from UTF-8 to Central European (Windows).
Expected Behavior
The encoding of updated files is not changed.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report. I can see the screenshot with a warning about an encoding mismatch between UTF-8 and Central European.
This is a known encoding issue when using AI to edit files. We have a few similar reports. Usually files get converted to UTF-8, but in your case it somehow changes from UTF-8 to Central European. The team is aware of the encoding issue and is working on a fix.
To link your report to the existing ticket, we need a bit more info:
Does this happen every time in Plan mode, or only sometimes?
What extensions are installed? (Settings > Extensions)
Are your Windows regional settings set to English, or Russian, or another Central European language?
Can you try reproducing this with a simple new C# file saved as UTF-8?
For now, the workaround is to manually re-save the file as UTF-8 after editing: bottom right corner of the editor → click the encoding → “Save with Encoding” → UTF-8.
Thank you for your response. Here is additional info:
Does this happen every time in Plan mode, or only sometimes?
I had a feeling it is not always but very often. But as I started to pay attention - today it happened always in all C# files. But json files worked fine.
It happens in the Agent mode too.
I have tried English as well as Slovak language prompts - it happened for both.