Hey, thanks for the report.
From your screenshot, the Chinese characters are already corrupted directly in the Hooks UI inside Cursor, which means the problem occurs inside Cursor before the data even reaches your Python script.
This is clearly a Windows‑specific encoding bug: Cursor isn’t handling UTF‑8 correctly when running hooks. I’ll pass this on to the team.
A couple of questions to help with the investigation:
- What is your Windows system locale? (Control Panel > Region > Administrative tab > “Language for non‑Unicode programs”)
- Is the “Beta: Use Unicode UTF‑8 for worldwide language support” option enabled in that same window?
Please let me know what your locale settings are.