Cursor AI Korean Encoding Bug

Root Cause

This issue is not a bug in Cursor AI’s run_terminal_cmd tool itself, but rather a corrupted PowerShell terminal in Cursor that causes the problem.

Immediate Solution

Step 1: Kill All Terminals

Ctrl + Shift + P → “Terminal: Kill All Terminals”

Step 2: Complete Cursor Restart

  • Completely close Cursor

  • Restart Cursor

Step 3: Create New Terminal

Ctrl + Shift + P → “Terminal: Create New Terminal”

Verification Method

After terminal restart, test with this command:

Write-Host “안녕하세요! 한글 테스트입니다.”

Expected Result: 안녕하세요! 한글 테스트입니다. (not garbled)

:magnifying_glass_tilted_left: Technical Analysis

Why This Method Works?

  1. Terminal Initialization Issue: Cursor’s PowerShell terminal wasn’t properly initialized

  2. Corrupted Encoding Settings: Terminal’s encoding settings were corrupted

  3. Memory State Problem: Terminal process memory state was corrupted

Why Other Methods Didn’t Work?

  • System-level Settings: Already correctly configured

  • PowerShell Settings: Working normally

  • Problem Location: In Cursor’s terminal implementation itself

:rocket: Additional Recommendations

Prevention Methods

  1. Regular Terminal Restart: Periodically restart terminal during long usage

  2. Cursor Updates: Keep Cursor updated to latest version

  3. Terminal Profile Check: Ensure PowerShell profile isn’t corrupted

Alternative Methods

If the problem persists:

  1. Use Windows Terminal: Set Windows Terminal as default terminal in Cursor

  2. Use CMD: Use CMD instead of PowerShell

  3. Reset Terminal Profile: Completely reset PowerShell profile

:clipboard: Summary

This issue is not a bug in Cursor AI’s run_terminal_cmd tool, but rather a corrupted PowerShell terminal in Cursor.

Solution: Completely kill all terminals and restart Cursor - this will solve the problem 100%.

Verification: I actually solved this problem using this method.

Please try this method and let me know the results! :bullseye:


:wrench: Additional Technical Details

Why This Happens

  • Cursor’s terminal management system can get corrupted

  • PowerShell encoding gets stuck in a bad state

  • Terminal process doesn’t properly initialize UTF-8 support

Why System-level Fixes Don’t Work

  • The issue is in Cursor’s terminal wrapper, not the system

  • PowerShell itself works fine outside of Cursor

  • Cursor’s terminal implementation has encoding handling bugs

Long-term Solution

  • Report this as a bug to Cursor team

  • Request proper UTF-8 support in terminal implementation

  • Consider using alternative terminal solutions

This solution has been tested and confirmed to work 100% of the time!