Hey, thanks for the report. This is a known encoding issue on Chinese Windows. Agent Write and StrReplace create files in GBK instead of UTF-8.
Root cause: the auto-detect encoding logic picks up GBK from the system environment or existing files and then propagates it to new files, even if the workspace is set to UTF-8.
Temporary workaround while it gets fixed:
- Reopen the file explicitly with GBK encoding: File > Reopen with Encoding > GBK
- Use Save As and pick UTF-8 encoding
Related reports:
- Agent Write/StrReplace tools output GBK-encoded files on Chinese Windows — persists in 3.0.13 even after ACP changed to 65001
- Subject: StrReplace Tool Corrupting UTF-8 Characters
The bug is logged, and your report helps raise the priority. Let me know if you notice any patterns for when it happens or does not happen. That would help the team.