ayn2op/discordo

Can't paste most emojis into messages (on Windows)

Closed this issue · 15 comments

So far, it appears that most emojis cannot be entered, only a select handful can.

OS: Windows 10 Pro [64-bit]
Terminal: Windows Terminal Version: 1.15.3465.0
Terminal Font: Caskaydia Cove Nerd Font
Build: Prebuilt binary (Windows) 13-Dec-2022

Steps to reproduce:

  1. Install Windows Terminal, create a profile and point the executable to discordo.exe
  2. Launch discordo profile, press "Windows" + "." to bring up the emoji menu.
  3. Insert ❤ emoji and send message, works (expected message: ❤, actual message:❤)
  4. Insert 💀 emoji

Expected output: 💀
Actual output: ��

This does not appear to be an issue of Windows Terminal (WT), as entering and parsing all emojis work fine in Git Bash in WT. Powershell 7 was also able to parse emojis in WT.

This does not appear to be an issue of Windows Terminal (WT), as entering and parsing all emojis work fine in Git Bash in WT. Powershell 7 was also able to parse emojis in WT.

What? is this a terminal or a discordo issue?

This does not appear to be an issue of Windows Terminal (WT), as entering and parsing all emojis work fine in Git Bash in WT. Powershell 7 was also able to parse emojis in WT.

What? is this a terminal or a discordo issue?

Sorry for the confusion. This is a discordo issue, as WT already supports emojis.

i can send unrendered emojis via discordo

i can send unrendered emojis via discordo

Hello,

May I ask which terminal program are you using? I can render emojis fine. I just cannot send them. Having them rendered or not would be a font related problem though, however I do not have any font issues. Also, in my situation some emojis work but others don't.

I don't have emoji fonts in the first place, I will test with font rendering later today. I am using st

Works fine for me with Plasma's emote selector and on Linux. Must be something to do with the emoji selector of Windows, the terminal, or Windows itself. I am using "Agave Nerd Font".
image

Hi,
I have done some additional testing, because I was certain that there were no issues parsing emojis from the Windows emote selector, nor from Windows Terminal. Here is what I have discovered:

Expected Behavior

  1. using the "chcp" command, the active console code page can be changed from "US" to "UTF-8". if chcp is set to "437" (United States), this happens in powershell:
    image

  2. setting chcp 65001 (utf8), this happens:
    image

This is the expected behavior of Windows Terminal. This works in Powershell, and also Bash when they are opened in Windows Terminal. However, even after setting "chcp 65001" and then launching discordo, discordo displays emojis like this on Windows:
image

Hi,
I have done some additional testing, because I was certain that there were no issues parsing emojis from the Windows emote selector, nor from Windows Terminal. Here is what I have discovered:

Expected Behavior

  1. using the "chcp" command, the active console code page can be changed from "US" to "UTF-8". if chcp is set to "437" (United States), this happens in powershell:
    image

  2. setting chcp 65001 (utf8), this happens:
    image

This is the expected behavior of Windows Terminal. This works in Powershell, and also Bash when they are opened in Windows Terminal. However, even after setting "chcp 65001" and then launching discordo, discordo displays emojis like this on Windows:
image

If you have WSL with a Linux distribution installed, try it there; somehow I am getting the feeling that it is going to work fine there.

Tested working fine on WSL with Ubuntu....
image

Tested working fine on WSL with Ubuntu.... image

Well, then, I guess this is just another Windows being PITA issue. I was dual-booting Windows 10 and Linux, and I can confirm that this is an issue on Windows 10; however I have no desire to find any workaround for this, because Windows 10 has always been PITA to me anyway.

This is ludicrous to see that Linux running inside Windows is more compatible with software than Windows itself. I don't think there's any easy way around this; but for the record, Discordo uses another Go library for its UI, this library just uses their features to display Discord on the CLI; I think you'll have better luck there.

If you don't manage to find any workaround for this, here are some possible solutions:

  • Use Discordo on WSL.
  • Wait for the developers of the CLI interface library to apply patches for this issue.
  • Switch to Linux.
  • Dual-boot Linux and Windows.
  • Just use emotes like this: :skull:. The other person will be able to see the emote.

@ernest859 One last question, "This is the expected behavior of Windows Terminal. This works in Powershell, and also Bash when they are opened in Windows Terminal. However, even after setting "chcp 65001" and then launching discordo, discordo displays emojis like this on Windows", where did you launch Discordo after doing the chcp command? PS or CMD?

@eeriemyxi Launched discordo via CMD as PS was known to be iffy with chcp and parsing it.

@eeriemyxi Launched discordo via CMD as PS was known to be iffy with chcp and parsing it.

You should try launching Discordo via PS after the chcp because CMD is not vying Bash but PS is (basically, I am trying to say that MS does improvements on PS, not CMD, CMD is legacy).

@eeriemyxi thanks for suggestion.
Update: Tested both on CMD and PS, does not parse emojis correctly even after "chcp 65001".

@eeriemyxi thanks for suggestion.
Update: Tested both on CMD and PS, does not parse emojis correctly even after "chcp 65001".

I am sorry to say that no patch from the interface library will resolve the issue but Windows: https://stackoverflow.com/a/64941169