Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion visual/computer/computer_action_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ def _type_text(self, text: str):
env["LC_ALL"] = "en_US.UTF-8"
subprocess.run(["pbcopy"], input=text.encode("utf-8"), env=env, check=True)
elif system == "Windows":
subprocess.run(["clip"], input=text.encode("utf-16le"), check=True)
# clip.exe expects UTF-16 with BOM; utf-16le alone is misread as ANSI on
# localized Windows and pastes mojibake into Search / text fields.
subprocess.run(["clip"], input=text.encode("utf-16"), check=True)
else:
subprocess.run(["xclip", "-selection", "clipboard"], input=text.encode("utf-8"), check=True)

Expand Down