Friday, December 01, 2017

Re: xterm(1) changing UTF-8 characters when copy-pasting?

Allan Streib <astreib@indiana.edu> writes:

> $ printf "e\xcc\x81\n" | od -a
> 0000000 e cc 81 nl
>
> $ printf "e\xcc\x81\n"
> é
>
> ^ copy/pasting: $ echo "é" | od -a
> 0000000 c3 a9 nl

Also in case it's interesting:

$ printf "e\xcc\x81" | xclip -i

$ xclip -o | od -a
0000000 e cc 81


$ echo "é" | od -a
0000000 e cc 81 nl

In the above, the "é" was obtained with middle-click (paste).


$ echo "é" | od -a
0000000 c3 a9 nl

In the above, the entire command 'echo "é" | od -a' was copied from the
prior line and pasted with the mouse.

Allan

No comments:

Post a Comment