# Cursor AI edits corrupt Windows-1252 encoding in C++ projects (even when editor shows 1252)

**URL:** <https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701>\
**Category:** Bug Reports\
**Tags:** inline-edit, c-cpp, windows, review\
**Created:** [February 3, 2026, 12:19pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701 "2026-02-03T12:19:47Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![taump](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/taump/32/91605_2.png) [@taump](https://forum.cursor.com/u/taump)\
**Post date:** [March 2, 2026, 8:15pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/59 "2026-03-02T20:15:24Z")

</div>

[char\_battle.zip](https://forum.cursor.com/uploads/short-url/lUIDDybEGvaf4iV28wbFG4UzKkY.zip) (20.5 KB) try

---

<div class="post-metadata">

**Author:** ![Tomasz\_Siedlaczek](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@Tomasz\_Siedlaczek](https://forum.cursor.com/u/Tomasz_Siedlaczek)\
**Post date:** [March 3, 2026, 6:47am UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/60 "2026-03-03T06:47:32Z")

</div>

[delphi7.7z](https://forum.cursor.com/uploads/short-url/jGhoyRhC2qhF1E9rfbuoghtRcUf.7z) (329 bajtów)

Hello Ani,  
I am sending two files: **Unit1 - kopia.pas** , the original file from the Delphi 7 IDE, and **Unit1.pas** , which was edited and saved by Cursor, despite my request not to modify any comments, messages, etc.

Regards,  
Tomasz

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [March 3, 2026, 9:25pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/62 "2026-03-03T21:25:45Z")

</div>

Hey all 👋

I have merged the related topics on encoding into a single thread, so we can keep everything in one place and avoid missing anyone when we share updates.

---

<div class="post-metadata">

**Author:** ![ani-anysphere](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@ani-anysphere](https://forum.cursor.com/u/ani-anysphere)\
**Post date:** [March 5, 2026, 3:03pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/65 "2026-03-05T15:03:40Z")

</div>

Hey Tomasz, thanks to your file, this should be fixed in the next version of Cursor. If you have explicitly configured a file with a particular encoding (even if that encoding is counter to what the agent would’ve auto-inferred), this encoding should be maintained, so that agent edits should generally match human-written ones.

An important question though, how are you telling Cursor that your file is Windows-1250? Are you doing “Reopen with encoding…” and the status bar says Windows-1250? Or are you using the `files.encoding` property?

---

<div class="post-metadata">

**Author:** ![Aziz\_Vicentini](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Aziz\_Vicentini](https://forum.cursor.com/u/Aziz_Vicentini)\
**Post date:** [March 7, 2026, 1:20pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/67 "2026-03-07T13:20:25Z")

</div>

I’m experiencing an issue with HTML and PHP files encoded in ISO-8859-1.  
Whenever I use agentic features or ‘Ctrl+K’ to refactor code, the special characters across the entire file get corrupted.

---

<div class="post-metadata">

**Author:** ![Tomasz\_Siedlaczek](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@Tomasz\_Siedlaczek](https://forum.cursor.com/u/Tomasz_Siedlaczek)\
**Post date:** [March 8, 2026, 4:03pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/68 "2026-03-08T16:03:33Z")

</div>

I am using the **`files.encoding` setting in the workspace configuration**.

In the root of my workspace I have:

`.vscode/settings.json`

with the following entry:

```auto
{
  "files.encoding": "windows1250",
  "files.autoGuessEncoding": false
}

```

So the encoding is defined at the **workspace level** , which means it applies to all files in the workspace and its subfolders.

I am **not relying on “Reopen with Encoding…” manually** for each file. The expectation is that Cursor opens and saves the files using **Windows-1250 automatically** because of the workspace `files.encoding` setting.

---

<div class="post-metadata">

**Author:** ![oliveira](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@oliveira](https://forum.cursor.com/u/oliveira)\
**Post date:** [March 8, 2026, 7:54pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/69 "2026-03-08T19:54:07Z")

</div>

I’m using version 2.2.44 because of the CP-850 corruption, which is the same issue as WIN1252 that has been discussed in several threads and hasn’t been fixed in the current version. Now I can’t use it anymore because everything I request displays the message “Please update to the latest Cursor version to continue using the Agent.” What should I do? Should I cancel my subscription since I’m paying and can’t use it due to the file corruption problem in the current versions, and they won’t let me use an older version that doesn’t have this problem? @deanrie

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/4/e/4e6119d7e8c64eddc7981a25960cac3cb64f0213.png)

---

<div class="post-metadata">

**Author:** ![oliveira](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@oliveira](https://forum.cursor.com/u/oliveira)\
**Post date:** [March 9, 2026, 7:32pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/70 "2026-03-09T19:32:02Z")

</div>

I suggest you pay attention to resolving this as soon as possible, because faced with the problem I signed up for Copilot for $10, which, integrated with Claude, I realized I no longer need to use Cursor (which costs $60). I project in Claude and use Copilot to apply the planning, so in short, I ended up saving $50 a month with this problem. However, I paid for Cursor a year in advance, and now what do I do with the credits I won’t be using anymore?

---

<div class="post-metadata">

**Author:** ![DBG](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@DBG](https://forum.cursor.com/u/DBG)\
**Post date:** [March 16, 2026, 10:17am UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/72 "2026-03-16T10:17:20Z")

</div>

Hello Cursor Team,

is this fixed in 2.6.19?

---

<div class="post-metadata">

**Author:** ![Aziz\_Vicentini](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Aziz\_Vicentini](https://forum.cursor.com/u/Aziz_Vicentini)\
**Post date:** [March 16, 2026, 11:30am UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/73 "2026-03-16T11:30:04Z")

</div>

I’ve just tested it and the iso8859-1 issue remains. I’m giving up on this; it’s been two months without any word on a fix. Cursor has become inviable for my workflow, and I’m being forced to seek alternatives.

---

<div class="post-metadata">

**Author:** ![StefanWoSoIT](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/stefanwosoit/32/112008_2.png) [@StefanWoSoIT](https://forum.cursor.com/u/StefanWoSoIT)\
**Post date:** [March 16, 2026, 11:32am UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/74 "2026-03-16T11:32:02Z")

</div>

+1 for the problem

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [March 16, 2026, 3:10pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/75 "2026-03-16T15:10:38Z")

</div>

Hey all,

The fix that @ani-anysphere worked on should land in the next client release towards the end of the month. You can already try it out by switching to Nightly ( **Cursor Settings \> Beta** ), but keep in mind these are pre-release builds.

---

<div class="post-metadata">

**Author:** ![Aziz\_Vicentini](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Aziz\_Vicentini](https://forum.cursor.com/u/Aziz_Vicentini)\
**Post date:** [March 17, 2026, 2:18pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/76 "2026-03-17T14:18:56Z")

</div>

it works 🎉

---

<div class="post-metadata">

**Author:** ![DBG](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@DBG](https://forum.cursor.com/u/DBG)\
**Post date:** [March 19, 2026, 8:51am UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/77 "2026-03-19T08:51:31Z")

</div>

Can you confirm it works with the latest version?

I’m still using 2.3.41 but now get warnings: This is a very old version of Cursor. Please update to the latest version at [Cursor · Download](http://cursor.com/downloads)

---

<div class="post-metadata">

**Author:** ![Joao\_Mateus\_Quaresma](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/joao_mateus_quaresma/32/103049_2.png) [@Joao\_Mateus\_Quaresma](https://forum.cursor.com/u/Joao_Mateus_Quaresma)\
**Post date:** [March 19, 2026, 12:40pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/78 "2026-03-19T12:40:37Z")

</div>

Bug persists.

**Version: 2.5.26 (system setup)**  
VSCode Version: 1.105.1  
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0  
Date: 2026-02-26T04:57:56.825Z (3 wks ago)  
Build Type: Stable  
Release Track: Default  
Electron: 39.4.0  
Chromium: 142.0.7444.265  
Node.js: 22.22.0  
V8: 14.2.231.22-electron.0  
OS: Windows\_NT x64 10.0.20348

---

<div class="post-metadata">

**Author:** ![Joao\_Mateus\_Quaresma](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/joao_mateus_quaresma/32/103049_2.png) [@Joao\_Mateus\_Quaresma](https://forum.cursor.com/u/Joao_Mateus_Quaresma)\
**Post date:** [March 19, 2026, 12:53pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/79 "2026-03-19T12:53:01Z")

</div>

> [@DBG](#):
>
> is this fixed in 2.6

Version and steps for pls.

---

<div class="post-metadata">

**Author:** ![Joyfullservice](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/joyfullservice/32/98498_2.png) [@Joyfullservice](https://forum.cursor.com/u/Joyfullservice)\
**Post date:** [March 19, 2026, 2:42pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/80 "2026-03-19T14:42:55Z")

</div>

I am still having the issue with both UTF-8 BOM and CRLF being converted to LF on the Early Access version.

Version: 2.6.20 (user setup)  
VSCode Version: 1.105.1  
Commit: b29eb4ee5f9f6d1cb2afbc09070198d3ea6ad760  
Date: 2026-03-17T01:50:02.404Z  
Build Type: Stable  
Release Track: Early Access  
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.26100

---

<div class="post-metadata">

**Author:** ![Aziz\_Vicentini](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Aziz\_Vicentini](https://forum.cursor.com/u/Aziz_Vicentini)\
**Post date:** [March 19, 2026, 5:42pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/82 "2026-03-19T17:42:09Z")

</div>

working in 2.7.0-pre.78.patch.0

---

<div class="post-metadata">

**Author:** ![kenx-iq](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@kenx-iq](https://forum.cursor.com/u/kenx-iq)\
**Post date:** [March 25, 2026, 9:45am UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/83 "2026-03-25T09:45:42Z")

</div>

Nightly version is still removing UTF-8 BOM.

Version: 2.7.0-pre.113.patch.0 (user setup)  
VSCode Version: 1.105.1  
Commit: 6f6ca294486449fb5e8fbae6c138d459ae95dd10  
Date: 2026-03-22T08:13:33.045Z  
Build Type: Stable  
Release Track: Nightly  
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

---

<div class="post-metadata">

**Author:** ![Joyfullservice](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/joyfullservice/32/98498_2.png) [@Joyfullservice](https://forum.cursor.com/u/Joyfullservice)\
**Post date:** [March 31, 2026, 9:11pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/84 "2026-03-31T21:11:44Z")

</div>

This issue is still occurring for me on the latest nightly (2.7.0-pre.172.patch.0), and it’s affecting a large portion of my workflow—almost every agent interaction ends up corrupting source files, which then have to be analyzed and corrected, spending additional time and tokens. Since file editing is such a core operation for LLM-driven workflows, this has been pretty disruptive on a daily basis.

Is there any additional diagnostic info I can provide to help narrow this down (logs, minimal repro, specific file patterns, etc.)? I’m happy to help test fixes or provide samples if that would accelerate resolution. (It has been nearly two months since this was first reported.)

Version: 2.7.0-pre.172.patch.0 (user setup)  
VSCode Version: 1.105.1  
Commit: de9b12bf051590906c465a8a9a221787ec3b88c0  
Date: 2026-03-31T05:49:04.779Z  
Layout: editor  
Build Type: Stable  
Release Track: Nightly  
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

[Previous page](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701.md?page=2)

[Next page](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701.md?page=4)
