PSReadLine: Some emoji, eg 'πŸ˜ƒ' don't work, whereas others like '⏰' do

Moved from https://github.com/microsoft/terminal/issues/1606

Using app store preview build of Windows Terminal, with <kbd>win+.</kbd> to send πŸ˜ƒ and then ⏰:

image

@DHowett-MSFT mentioned it’s likely not a Windows Terminal issue:

Powershell has trouble with high unicode input … and there’s not much we can do to help that.


Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 5
  • Comments: 28 (13 by maintainers)

Most upvoted comments

Cooked read is provided by conhost.exe, not Core, and we cannot change it without significantly impacting application compatibility all across Windows. Raw input with a readline-like library is the correct thing to do.

@SeeminglyScience Yes, please open a new issue for Delete. Thanks!

Yeah you gotta change output encoding first:

[Console]::OutputEncoding = [Text.Encoding]::Unicode

@daxian-dbw it’s sent as two separate keys. If you do this you’ll see both

while ($true) {
    '0x{0:X4}' -f [int][Console]::ReadKey($true).KeyChar
}

@iSazonov Unfortunately, no news from the PSReadLine side. also, as mentioned in this issue, the same repros without PSReadLine.

Seems like there is an issue in both PS and PSRL. We can keep this issue here for now. Removing PSRL and on macOS, simply pasting "πŸ˜ƒ results in οΏ½"πŸ˜ƒοΏ½. Quite strange.