[Windows] Hooks receive corrupted UTF-8 (? instead of Cyrillic)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Environment:

  • OS: Windows 11
  • Cursor Version: 2.4.22
  • System Locale: Russian

Description:
Hook scripts receive malformed JSON on stdin where Cyrillic characters
are replaced with ???. The encoding corruption happens before the hook
script executes - it’s not a script-side issue.

Known bug reports:

Steps to Reproduce

Reproduction:

  1. Create hooks.json with sessionStart hook
  2. Create Python script that logs stdin to file
  3. Start composer session with Russian prompt
  4. Check log - Cyrillic appears as ???

Expected: UTF-8 encoded JSON with correct Cyrillic
Actual: JSON with ??? replacing non-ASCII characters

Sample hook script:

import sys, json
with open('/tmp/cursor-hook.log', 'a') as f:
    data = sys.stdin.read()
    f.write(data + '\n')
print('{}')

Operating System

Windows 10/11

Version Information

Cursor IDE Version: 2.4.22

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. A fix for this issue should be in the next release.

This bug is the same as these reports:

You’re on version 2.4.22, and the fix might already be in a newer version. Please try:

  • Update to the latest stable (Help > Check for Updates)
  • Or try a nightly build

If the issue still happens after updating to the latest version, let me know. Please share what version you’re on after the update.

I tested this on version 2.4.23, and the problem still persists.
Could you please advise which upcoming version will include a fix?
This issue is significantly affecting my workflow.