# 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, windows, c-cpp, 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:** 1\
**Showing post:** 55

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [February 28, 2026, 5:34pm UTC](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701/55 "2026-02-28T17:34:09Z")

</div>

Hey, thanks for the report.

This is a known issue. AI edits convert non-UTF-8 files to UTF-8 when saving. A few threads on the same topic:

- [Windows-1252 corruption in C++](https://forum.cursor.com/t/150701)
- [search\_replace tool corrupts ANSI/Windows-1252](https://forum.cursor.com/t/148993)
- [Inline edits break encoding in legacy project](https://forum.cursor.com/t/146656)

There was a fix in 2.5, but based on user reports it did not fully solve the issue. I’ll pass to the team that the bug is still reproducible on 2.5.26 with Windows-1250 encoding.

Unfortunately, there is no reliable workaround yet. `files.encoding`, `.editorconfig`, and `.cursorrules` do not help because the conversion happens in the apply pipeline, not in the editor.

I’ll share an update when I have news.

---

_[View the full topic](https://forum.cursor.com/t/cursor-ai-edits-corrupt-windows-1252-encoding-in-c-projects-even-when-editor-shows-1252/150701)._
