Terminal: OSC52 does not handle UTF-8 correctly ("copying content using tmux copy mode doesn't paste properly")

Created on 3 Oct 2020  路  4Comments  路  Source: microsoft/terminal

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.508]
Windows Terminal version: 1.3.2651.0

Other software:

Tmux version: tmux 3.0a
Running Ubuntu 20.04.1 LTS inside of WSL2

Steps to reproduce

All the steps to reproduce this issue are stated in this issue that I created.
Please read that issue as it contains some more information about my environment and some relevant comments.

It seems like this issue doesn't relate to a problem with tmux but rather a problem with the Windows Terminal or the windows clipboard.

Expected behavior

When I copy content using tmux copy mode I would like to have the ability to paste it outside of tmux containing the exact same characters which can be seen here in a browser search bar:
image

Actual behavior

The content is not pasted properly as this character shows up as cryptic characters:
image

Area-VT Impact-Correctness Issue-Bug Priority-2 Product-Terminal Resolution-Fix-Committed

Most helpful comment

/cc @uzxmx
It looks like s_Decode in base64 is transforming the raw bytes that come out of the base64 encoded clipboard data _directly into UCS-2 codepoints_ instead of running them through UTF-8->UTF-16 conversion.

All 4 comments

/cc @uzxmx
It looks like s_Decode in base64 is transforming the raw bytes that come out of the base64 encoded clipboard data _directly into UCS-2 codepoints_ instead of running them through UTF-8->UTF-16 conversion.

In the meantime, you can execute tmux show-buffer | clip.exe which will put the correct string on the Windows clipboard.

:tada:This issue was addressed in #7870, which has now been successfully released as Windows Terminal v1.4.3141.0.:tada:

Handy links:

:tada:This issue was addressed in #7870, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

TayYuanGeng picture TayYuanGeng  路  3Comments

mrmlnc picture mrmlnc  路  3Comments

zadjii-msft picture zadjii-msft  路  3Comments

miniksa picture miniksa  路  3Comments