Skip to content

Bug: Pasting Chinese characters into the prompt box results in garbled text (乱码) on WSL #5

@gonghb2577-zzvc

Description

@gonghb2577-zzvc

When running the aicodeprep-gui in a WSL (Windows Subsystem for Linux) environment, pasting Chinese text from the clipboard into the "Optional prompt/question for LLM" input field causes the characters to be displayed as garbled text.

Steps to Reproduce:

  1. Copy a string of Chinese characters on the Windows host.
  2. Launch aicp within a WSL terminal.
  3. Click into the "Optional prompt/question for LLM" text box.
  4. Paste the content via Ctrl+V or the context menu.

Expected Behavior:
The Chinese characters should be displayed correctly in the text box.

Actual Behavior:
The text box displays incorrect, garbled characters (known as "luànmǎ").

Environment:

OS: Windows Subsystem for Linux (WSL 2 / WSLg)
aicodeprep-gui Version: 1.1.1
Python Version: 3.13.5
Installation Method: pipx install aicodeprep-gui

Additional Context:
This is likely an encoding issue between the Windows clipboard and the GUI toolkit (e.g., Qt/Tkinter) running within the WSLg environment. The application may not be correctly interpreting the clipboard's encoding format for non-ASCII characters.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions