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
- Open a Delphi .pas file with ANSI/Windows-1252 encoding containing Spanish characters
- Use
search_replaceto modify any section of the file - 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