Cursor changes encoding of source code file

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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.

  1. Click New Agent and switch to the Plan mode.
  2. Let Cursor create a plan.
  3. Build the plan.
  4. 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

Screenshot 2026-01-18 164959.png

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.41 (user setup)
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

Auto

For AI issues: add Request ID with privacy disabled

Request ID: 85310285-c865-4e7d-bda0-5d658b4da0ed

Does this stop you from using Cursor

No - Cursor works, but with this issue

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.

Extensions:

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Windows settings:

Windows display language: English (United States)

Secondary language: Slovak

Country region: Slovakia

Can you try reproducing this with a simple new C# file saved as UTF-8?

I am able to reproduce it with a very simple C# source code file in Plan as well as Agent modes. (I was not able to reproduce it with json file.)

Same here… C#, .netframework 4, my utf8 with bom files which was edited or created by auto agent looses it’s bom part!

Same here, when using plan mode, encoding mess is coming. Especially when try to use Hungarian characters (űáéúőóüöí ŰÁÉÚŐÓÜÖÍ) somewhere on the code

I downgraded to 2.3 and it seems to work.