1

I'm using fish-shell on CentOS8.

I would like to insert the following to file.

function fish_title
    echo "🔥 AmericaN 🔥"
end

But upon trying to paste it into the file, I see the following:

function fish_title
    echo " AmericaN "
end

enter image description here

Even via cat command, I am still unable to see it.

Here's the output of locale and $TERM

❯ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
❯ echo $TERM
xterm-256color

I'm using Windows New Terminal to access my CentOS server, and I'm pasting to the file using CTRL+V or SHIFT+INSERT or mouse right-click

The editor is nano

15
2

Well, I managed to fix the issue by asking the developers of Windows New Terminal about why I'm unable to paste Unicode over SSH connection.

And i got the following response:

The version of OpenSSH-Win32 that’s available today doesn’t support receiving Unicode. That has been fixed pending release!

So I've just wrote it to online editor and downloaded it via wget

wget https://bpaste.net/raw/OXEQ -O test

and now it's works.

❯ cat test
function fish_title
    echo "🔥 AmericaN 🔥"
end⏎
8
  • This is an issue with Windows New Terminal itself? I've just tried it under Cygwin (mintty.exe) and had no issues. – roaima Jan 17 '20 at 17:18
  • @roaima it's not about Windows New Terminal. actually it's about OpenSSH current version. – αԋɱҽԃ αмєяιcαη Jan 17 '20 at 17:20
  • I wonder what Cygwin's using for its SSH implementation then. Works fine there remotely, too. – roaima Jan 17 '20 at 17:23
  • @roaima you are lucky though. they are using the latest beta version which actually supporting Unicode paste ! cygwin.com/packages/summary/openssh.html – αԋɱҽԃ αмєяιcαη Jan 17 '20 at 17:26
  • 1
    That is real weird as ssh should just pass bytes. It should not be concerned with characters. – ctrl-alt-delor Jan 17 '20 at 17:38
0

I have just tired this in konsole( the KDE terminal). It showed the flames as a box (indicating no character in the font). I then went to the font configuration for the terminal, almost all fonts show a box, a space, or a hexcode character.

One font (that had the name emoji in the name) showed the flames.

1
-1

I tried it with printf and it worked: Try: printf 🔥 >> file.txt

You could also do an alias:

# $1 = File, $2 = Emoji alias addEmoji="printf $2 >> $1"

Mind I switched the arguments around because I had some issues displaying after I pasted the Emoji. If you want to play around with Unicode some more, I recommend this: https://stackoverflow.com/a/602924/12546645

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.