-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Problem (one or two sentences)
When executing any Python script that produces Chinese output (not limited to simple print statements), the text appears as garbled text (mojibake) in the Roo Code "Executing" interface. While I demonstrated this with a simple print example, this affects all standard output containing Chinese. (It is currently unconfirmed if other programming languages face the same encoding issue on Windows, but it is persistent with Python).
Context (who is affected and when)
This affects Windows users relying on Roo Code's Terminal Shell Integration.
Crucially, this issue impacts not only human readability but also the LLM's ability to interpret the output. Since the model "reads" the output captured via the shell integration to verify execution results, the garbled text prevents the LLM from confirming that the script ran correctly, leading to potential hallucinations or unnecessary debugging loops.
Reproduction steps
- Create a Python script (e.g.,
1.py) with the following content:print("Hello, World!") print("你好,世界!")
- Ask Roo Code to run this file:
python 1.py - Observe Failure: The English text is correct, but the Chinese text is garbled.
- Verify Fix: Modify the script to force UTF-8 encoding:
import sys sys.stdout.reconfigure(encoding='utf-8') print("你好,世界!")
- Run the script again via Roo Code.
- Observe Success: The Chinese text now displays correctly, confirming the root cause is stdout encoding.
Expected result
Hello, World!你好,世界!
Actual result
Hello, World! ��ã����磡
Variations tried (optional)
No response
App Version
Version: 3.39.2
API Provider (optional)
DeepSeek
Model Used (optional)
N/A
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
Hello, World!
��ã����磡Metadata
Metadata
Assignees
Labels
Type
Projects
Status