Hey, thanks for the report. This is a known issue. Agent ignores the file’s original encoding and saves everything as UTF-8, which breaks non-UTF-8 characters, in your case EUC-KR.
Related threads:
- Encoding changing when editing EUC-KR files (EUC-KR)
- Issue with Agent Corrupting Korean Characters (EUC-KR Encoding) during Auto-Edits (EUC-KR)
- Cursor returns UTF-8 code despite Windows-1252 configuration (Windows-1252, same root cause)
A fix shipped in 2.5, but we’re still hearing that it may not be fully resolved. I’ve passed this to the team, your report helps us prioritize it.
Workarounds:
- Use
Ctrl+K(inline edit) instead of Agent when editing EUC-KR files. You’ve already noticed this works correctly. - If you do use Agent, after editing click the encoding in the bottom-right of the editor, then choose “Reopen with Encoding” → EUC-KR, then “Save with Encoding” → EUC-KR. Note: this may not fully recover the file if Agent already corrupted characters on its side.