-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some emoji, eg '😃' don't work, whereas others like '⏰' do #1329
Comments
I wonder if this is due to PS itself or PSReadLine... Can you |
Interesting. Input doesn't like it much, but output is OK. I'd venture to say this is probably an issue both for PS itself in places and the PSReadLine module as well, @daxian-dbw any thoughts on this? |
/cc @daxian-dbw @SteveL-MSFT Should we track the issue here or in PSREadline repo? |
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 |
@chuanjiao10 that may be true on Windows, but on macOS there is still an issue although perhaps different from the original issue |
In Windows Terminal, garbage characters may appear when deleting the emoji character. |
@daxian-dbw Is any updates in PSRL with the issue? |
@iSazonov Unfortunately, no news from the |
PSReadline uses raw input and non-PSReadline uses |
I'd prefer to get updated |
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. |
I mean that this must be in Core so that we do not re-implement this in every application. Is there a tracking issue? |
I opened dotnet/runtime#800, maybe not entirely correct, but the presence of these features in Core seems desirable. |
@DHowett-MSFT You mentioned in microsoft/terminal#1606 that:
For all high unicode emoji input, such as 😀 (surrogates: |
@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
} |
Also, I think escape sequences are being written between the surrogates: [Console]::WriteLine("`u{D83D}`u{DE00}")
# Shows emoji
[Console]::WriteLine("`u{D83D}`e[30m`u{DE00}")
# Shows two separate question mark characters |
Yeah you gotta change output encoding first: [Console]::OutputEncoding = [Text.Encoding]::Unicode |
Oh, is it a time to change [Console]::OutputEncoding to Utf8 for PowerShell? |
Also |
@SeeminglyScience Yes, please open a new issue for |
For me later: microsoft/terminal#1503 (comment) |
I've got also an Exception for a 💄in my commit message. Exception:
|
Revisiting this issue, I dont seem to get any errors copying and pasting large sets of emojis in Windows Terminal with PowerShell 7.3.1 and PSReadLine 2.2.6 Without windows Terminal it seems to be okay but has little different rendering and a few ?? With Mac it gets a little messy with more than like 2 emojis, see screen recording Uploading Screen Recording 2023-01-04 at 9.14.48 AM.mov… |
Has this issue been fixed? |
Moved from microsoft/terminal#1606
Using app store preview build of Windows Terminal, with win+. to send 😃 and then ⏰:
@DHowett-MSFT mentioned it's likely not a Windows Terminal issue:
The text was updated successfully, but these errors were encountered: