-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSC52 does not handle UTF-8 correctly ("copying content using tmux copy mode doesn't paste properly") #7819
Comments
/cc @uzxmx |
In the meantime, you can execute |
This commit adds a missing conversion utf8 to utf16 in decoding base64 for handling multibyte text in copying via OSC 52. ## Validation Steps Performed * automatically * Tests w/ multibyte characters * manually * case1 * Executed `printf "\x1b]52;;%s\x1b\\" "$(printf '👍👍🏻👍🏼👍🏽👍🏾👍🏿' | base64)"` * Verified `👍👍🏻👍🏼👍🏽👍🏾👍🏿` in my clipboard * case2 * Copied `👍👍🏻👍🏼👍🏽👍🏾👍🏿` by tmux 2.6 default copy function (OSC 52) * Verified `👍👍🏻👍🏼👍🏽👍🏾👍🏿` in my clipboard Closes #7819
This commit adds a missing conversion utf8 to utf16 in decoding base64 for handling multibyte text in copying via OSC 52. ## Validation Steps Performed * automatically * Tests w/ multibyte characters * manually * case1 * Executed `printf "\x1b]52;;%s\x1b\\" "$(printf '👍👍🏻👍🏼👍🏽👍🏾👍🏿' | base64)"` * Verified `👍👍🏻👍🏼👍🏽👍🏾👍🏿` in my clipboard * case2 * Copied `👍👍🏻👍🏼👍🏽👍🏾👍🏿` by tmux 2.6 default copy function (OSC 52) * Verified `👍👍🏻👍🏼👍🏽👍🏾👍🏿` in my clipboard Closes #7819 (cherry picked from commit 743283e)
🎉This issue was addressed in #7870, which has now been successfully released as Handy links: |
🎉This issue was addressed in #7870, which has now been successfully released as Handy links: |
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:
Actual behavior
The content is not pasted properly as this character shows up as cryptic characters:
The text was updated successfully, but these errors were encountered: