Incorrect content copied from terminal (Japanese Toothpaste?) #19438

Open
opened 2026-01-31 06:43:17 +00:00 by claunia · 0 comments
Owner

Originally created by @dadastoor on GitHub (Feb 22, 2023).

Originally assigned to: @DHowett on GitHub.

Windows Terminal version

1.17.1023

Windows build number

10.0.19044.0

Other Software

tmux 3.0a

$ cat ~/.tmux.conf| without_comments
set -g default-shell /usr/bin/zsh
bind S source-file ~/.tmux/bastion-quad
set -g default-terminal "tmux-256color"
set -g history-file ~/.tmux_history
set -g history-limit 150000
set-environment -g 'IGNOREEOF' 10
set -g prefix `
unbind -n C-l
unbind -n C-t
unbind -n C-u
unbind -n C-y
unbind -n C-d
unbind -n C-b
unbind C-d
bind ` send-prefix
bind r source-file ~/.tmux.conf \; display "Tmux config reloaded"
bind c new-window -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind = split-window -h -c "#{pane_current_path}"
bind -n C-S-Left swap-window -t -1\; select-window -t -1
bind -n C-S-Right swap-window -t +1\; select-window -t +1
bind -n C-o select-pane -t :.+
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
setw -g mouse on
setw -g automatic-rename off
set-window-option -g mode-style bg=colour25,fg=colour254
set -g pane-border-style fg=colour28
set -g pane-active-border-style bg=default,fg=colour98
set -g status-justify centre       # center window list for clarity
set-option -g status-position top  # position the status bar at top of screen
setw -g monitor-activity off
set -g visual-activity off
set -g status-style bg=colour28,fg=default
set -g window-status-style fg=colour7
set -g window-status-current-style fg=colour1,bg=colour7
bind m run "tmux new -d -s second; tmux movew -t second;"
bind M run "tmux movew -t base;"
set -g status-interval 300
set -g status-right-length 60
set -g status-right "#[fg=colour73] %d %b %Y %l:%M %p"
set -g @override_copy_command 'clip.exe'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
run '~/.tmux/plugins/tpm/tpm'

Here's terminal's interaction settings
image

Steps to reproduce

This seems to only be an issue in TMUX... however I've tested this in the current stable terminal version of 1.16.10261.0 and it is not a problem

try to copy the text sl iam token refresh. You have to be careful not to get any pre or post characters.

  • as far as I can tell, the terminal colouring has no effect on this

empty clipboard
image

selecting text to copy
image

Japanese text copied to clipboard
image

selecting text to copy - with additional text at beginning
image

proper text copied to clipboard
image

Expected Behavior

copy text sl iam token refresh into clipboard

Actual Behavior

copies out text 汳椠浡琠歯湥爠晥敲桳 which when pasted into google translate, is apparently Japanese for toothpaste

image

Originally created by @dadastoor on GitHub (Feb 22, 2023). Originally assigned to: @DHowett on GitHub. ### Windows Terminal version 1.17.1023 ### Windows build number 10.0.19044.0 ### Other Software tmux 3.0a ``` $ cat ~/.tmux.conf| without_comments set -g default-shell /usr/bin/zsh bind S source-file ~/.tmux/bastion-quad set -g default-terminal "tmux-256color" set -g history-file ~/.tmux_history set -g history-limit 150000 set-environment -g 'IGNOREEOF' 10 set -g prefix ` unbind -n C-l unbind -n C-t unbind -n C-u unbind -n C-y unbind -n C-d unbind -n C-b unbind C-d bind ` send-prefix bind r source-file ~/.tmux.conf \; display "Tmux config reloaded" bind c new-window -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" bind = split-window -h -c "#{pane_current_path}" bind -n C-S-Left swap-window -t -1\; select-window -t -1 bind -n C-S-Right swap-window -t +1\; select-window -t +1 bind -n C-o select-pane -t :.+ bind H resize-pane -L 5 bind J resize-pane -D 5 bind K resize-pane -U 5 bind L resize-pane -R 5 bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" setw -g mouse on setw -g automatic-rename off set-window-option -g mode-style bg=colour25,fg=colour254 set -g pane-border-style fg=colour28 set -g pane-active-border-style bg=default,fg=colour98 set -g status-justify centre # center window list for clarity set-option -g status-position top # position the status bar at top of screen setw -g monitor-activity off set -g visual-activity off set -g status-style bg=colour28,fg=default set -g window-status-style fg=colour7 set -g window-status-current-style fg=colour1,bg=colour7 bind m run "tmux new -d -s second; tmux movew -t second;" bind M run "tmux movew -t base;" set -g status-interval 300 set -g status-right-length 60 set -g status-right "#[fg=colour73] %d %b %Y %l:%M %p" set -g @override_copy_command 'clip.exe' set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-yank' run '~/.tmux/plugins/tpm/tpm' ``` Here's terminal's interaction settings ![image](https://user-images.githubusercontent.com/72048428/220738245-eaf4eb9b-9ad4-4702-95e3-3abdb2d52155.png) ### Steps to reproduce **This seems to only be an issue in TMUX... however I've tested this in the current stable terminal version of `1.16.10261.0` and it is not a problem** try to copy the text `sl iam token refresh`. You have to be careful not to get any pre or post characters. - as far as I can tell, the terminal colouring has no effect on this empty clipboard ![image](https://user-images.githubusercontent.com/72048428/220736361-76e6c2e7-83cd-4ac4-8966-c9b7d2c6a8e5.png) selecting text to copy ![image](https://user-images.githubusercontent.com/72048428/220736429-1d1c5ee7-38ce-4a42-8e3b-fd1fc5069d2f.png) Japanese text copied to clipboard ![image](https://user-images.githubusercontent.com/72048428/220736490-5c81f5a7-880e-4b8d-bef3-71081dadca20.png) selecting text to copy - with additional text at beginning ![image](https://user-images.githubusercontent.com/72048428/220736583-91ea7734-0d51-460f-9202-7201596b6bb4.png) proper text copied to clipboard ![image](https://user-images.githubusercontent.com/72048428/220736624-3236dae8-40a1-4fb2-917b-5d87d402a083.png) ### Expected Behavior copy text `sl iam token refresh` into clipboard ### Actual Behavior copies out text `汳椠浡琠歯湥爠晥敲桳` which when pasted into google translate, is apparently Japanese for `toothpaste` ![image](https://user-images.githubusercontent.com/72048428/220736882-4befe27a-d69b-4e32-b2cb-f6a8d610dc79.png)
claunia added the Issue-BugNeeds-Tag-Fix labels 2026-01-31 06:43:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19438