microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.86k stars 29.14k forks source link

Emoji don't work in native Windows shells (WSL is fine) #35266

Closed mjbvz closed 10 months ago

mjbvz commented 7 years ago

Steps to Reproduce:

  1. Bring up the emoji keyboard in windows
  2. Select vscode terminal and try clicking on an emoji to insert it

Bug Corrupted Unicode characters are inserted

a

Tyriar commented 7 years ago

Upstream: https://github.com/sourcelair/xterm.js/issues/469

KillyMXI commented 6 years ago

Looks like it's not even possible to paste emoji from clipboard. And it also breaks everything if you paste combined characters...

Tyriar commented 6 years ago

@KillyMXI pasting emoji should work, it works differently to in the editor though. The representation of the emoji depends on the shell (eg. bash) which may have patchy support for combined emojis.

KillyMXI commented 6 years ago

Checked it once again. OK, pasting is shell dependent. I think I was focused on GHCi at that moment. It works in PowerShell, although doesn't accommodate additional space for emojis (doubled character width for them would be nice in monospaced environment with majority of fonts). No combined emojis - OK, that must be tricky enough stuff for now.

But I meant any combined characters. Here I paste two characters - one is a single Unicode symbol and the other one is made of "e" symbol and combining acute accent mark: Cursor position is not synced with display after that. (Should I open a separate issue for that?)

warpdesign commented 6 years ago

It's not a windows only issue. Same problem with macOS: #38064.

mzkev commented 6 years ago

I cant bring up the emoji keyboard in vscode on windows. Has this been fixed yet?

gertcuykens commented 5 years ago

Doesn't seem to be fixed

image

image

Version: 1.29.1 (user setup) Commit: bc24f98b5f70467bc689abf41cc5550ca637088e Date: 2018-11-15T19:13:36.375Z Electron: 2.0.12 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: x64

https://github.com/matchai/spacefish/issues/118

warpdesign commented 5 years ago

It still doesn't work in macOS either:

lgarron commented 5 years ago

I've also had trouble inserting emoji on macOS. I assumed I was doing something wrong or had a transient issue, but I still see the same issues that @warpdesign describes. :-(

Ciantic commented 4 years ago

I'm used to having Haskell prompt with a pickle (for obvious reasons) in front:

:set prompt "🥒 >>> "

It works with VSCode when it's running bash e.g. inside docker container development. But it ceases to working when I use it inside Powershell in Windows.

Just giving me:

🥒 >>>

I think this is some Powershell/Windows problem.

stam commented 4 years ago

This bug requires me to switch to Iterm and leave my vscode focus in order to commit, would love a fix

Dc9894 commented 4 years ago

I don't think it's just related to the shell you are using I'm using powershell core as the default integrated terminal and though I can get some emojis typed in there, the characters before and after look weird if shown at all

ListsOfArrays commented 4 years ago

Path names with emojis in them also result in issues. I have a preview edition of PowerShell installed that supports that, but VS Code both inserts a junk character and results in the terminal being off by two characters when typing & displaying inputs: image vs the vanilla PowerShell terminal: image

nijikokun commented 4 years ago

I'm receiving a similar issue using Git Bash on Windows where the emoji has an additional character / corruption being inserted beside it:

image

ColinTimBarndt commented 4 years ago

When using the Terminal, I encounter the exact same problem with the junk characters, as @ListsOfArrays mentioned, but when using the debugger (Rust), all emojis work correctly, probably because it's not using the PowerShell. There has to be an error in the communication between PS and VSC.

slinkardbrandon commented 4 years ago

Today I got really sad when I couldn't commit with an emoji, guys this is breaking people's hearts.

windcheck commented 4 years ago

Using Windows Terminal powershell runs without problems. When I go to VS code integrated powershell it's broken. See screenshot.

stack1

ynechaev commented 4 years ago

This issue has nothing to do with PowerShell or VSCode, it's actually related to xtermjs issue https://github.com/xtermjs/xterm.js/issues/469 and it was mentioned above.

Tyriar commented 4 years ago

Note that this issue is about emoji IMEs which are the popup you can use to input emojis. Simple support for them is patchy because WT and conpty seem to do something a little different to what they're trying to emoji, that's tracked in https://github.com/xtermjs/xterm.js/issues/2693

regalstreak commented 3 years ago

Any workaround for this? @Tyriar Been facing this for years

andy3520 commented 3 years ago

😟 Still cannot add awesome emoji to git commit by using ctrl+cmd+space. I have to use source control in the vscode or insert the emoji some then copy + paste it to the terminal

jv-k commented 3 years ago

This is a good workaround until the 🐞 is fixed:

https://marketplace.visualstudio.com/items?itemName=bierner.emojisense

Works in the terminal as well. In MacOS you can use cmd + i to bring up the emoji panel and easily insert.

Tyriar commented 3 years ago

Our support right now seems about as good as Windows terminal, the emoji selector doesn't work but you can write emojis to the terminal. Below shows the second one input via the emoji IME (win+.)

image

WT:

image

Tyriar commented 3 years ago

Message sent to pwsh 7.0.1:

image

Message received from pwsh 7.0.1:

image

Tyriar commented 3 years ago

Related: https://github.com/PowerShell/PowerShell/issues/15256

Tyriar commented 3 years ago

Ok this is definitely an upstream issue: https://github.com/microsoft/terminal/issues/190

FWIW emoji support works fine in wsl which proves we're doing the right thing (plus mac/linux works fine):

image

I'll keep this open as it's a pretty big issue but it's just tracking the upstream issue.

ullaskunder3 commented 2 years ago

@Tyriar sir is there any fix? 2021 still the same problem in vs code default bash terminal
If I add emoji from Win emoji picker it just show <?> image

erhanertem commented 2 years ago

@Tyriar sir is there any fix? 2021 still the same problem in vs code default bash terminal If I add emoji from Win emoji picker it just show <?> image

Use powershell therminal in vscode....It works fine. Bash still problematic.

Tyriar commented 10 months ago

Closing this in favor of the upstream issue since there's no further action on us to support this: https://github.com/microsoft/terminal/issues/190