Hey, thanks for the report. This is a known issue: Agent in 2.4.x forces all files to be saved as UTF-8, ignoring the original encoding.
Similar reports with GBK, EUC-KR, Windows-1252:
- It changed the file encoding format, causing the text to become garbled (GBK/Korean/Chinese)
- Encoding changing when editing EUC-KR files (EUC-KR)
- Search_replace tool corrupts ANSI/Windows-1252 encoding (Windows-1252/Delphi)
Workarounds:
- Roll back to 2.3.41. A few users confirmed this fully fixes the issue.
- After Agent edits: bottom-right corner of the editor → click the encoding → “Reopen with Encoding” → GBK, then “Save with Encoding” → GBK.
- Try
CTRL+K(inline edit) instead of Agent/Chat. It might break encoding less, but it’s not guaranteed.
The team is aware of the issue. Your report helps raise the priority, especially for GBK/GB2312, which are critical for Chinese legacy projects.