Search_replace tool corrupts ANSI/Windows-1252 encoding

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The search_replace tool corrupts special characters (á, é, í, ó, ú, ñ) in Delphi .pas files encoded as ANSI/Windows-1252, even when modifying small sections of code.

Steps to Reproduce

  1. Open a Delphi .pas file with ANSI/Windows-1252 encoding containing Spanish characters
  2. Use search_replace to modify any section of the file
  3. Special characters get corrupted (e.g., ‘á’ becomes ‘á’, then ‘úscula’)

Expected Behavior

The tool should preserve the original file encoding and not corrupt existing special characters.

Actual Behavior:
Special characters are corrupted even in lines that were not directly targeted for modification, but were part of a larger context block.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.35 (user setup)
VSCode Version: 1.105.1
Commit: cf8353edc265f5e46b798bfb276861d0bf3bf120
Date: 2026-01-13T07:39:18.564Z
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.19045

For AI issues: which model did you use?

Automatic

Additional Information

  • File encoding: ANSI/Windows-1252
  • File type: Delphi .pas source files

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known issue. The agent currently always saves files as UTF-8, even if a different encoding is set in the workspace.

Temporary workaround:

  • After the agent edits a file, manually re-save it as Windows-1252 (bottom-right corner of the editor, click the encoding, then “Save with Encoding”, then Windows-1252)
  • Or try using CTRL+K for inline edits instead of the agent. It may mess up the encoding less, but it’s not guaranteed

Can you share the Request ID from the most recent broken generation? Click the three dots in the top-right of the chat, then Copy Request ID. I’ll link your report to our internal ticket to raise the priority of the fix for Delphi and ANSI files.

I do not know what do you refer with the Request ID from the most recent broken generation.

There are not three dots in the top-right of this chat.

The problem started very recently (7 days?).

Sorry, in my first try I thought that the problem was solved

No, it is not solved

I still can’t use a cursor because of this problem

Please solve it

Any news about this issue?

I’m about to cancel my subscription.

I’m pàying for nothing …

When will this be fixed? Because reopening the file with a different encoding doesn’t solve the problem.

One month after this BIG ISSUE, the problem is not solved.

I do not understand how it can be as it …

I am looking for a replacement tool to cursor IDE …

I do not want to do it … but if the problem persists, I will replace cursor IDE with windsurf, google antigravity or github copilot.