blinksh / blink

Blink Mobile Shell for iOS (Mosh based)
https://blink.sh
GNU General Public License v3.0
6.16k stars 576 forks source link

OSC52 can not work with UTF8 characters #1026

Open laruence opened 4 years ago

laruence commented 4 years ago

With a custom osc52 script like https://github.com/laruence/stashes/blob/master/osc52.php

it works fine if the copied string is ascii charaters , but it can not works with utf-8 strings.

echo “中国” | osc52.php

blink shows a clipboard copy icon, which should mean it copied successfully,

but with cmd+v I get:

中国

which are:


0000000: c3a4 c2b8 c2ad c3a5 c29b c2bd 0a 

it looks like blink take the osc52 base64 utf8 encoded string as latin1 encoded..

abrookins commented 4 years ago

Interesting. I confirmed this with another OSC 52 script (“yank”).