-
Notifications
You must be signed in to change notification settings - Fork 297
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
Unable to translate '\\uD83D': older conpty issue -- only high surrogate gets pasted to buffer #3832
Comments
@DanielEmeka2003 What is the emoji you were using in the screenshot? Please share that emoji for me to reproduce the issue. |
The issue isn't specific to a particular emoji. |
hmm, I cannot reproduce this locally with Visual Studio Code terminal, and my OS version is the same as yours. @SeeminglyScience Any ideas why the emoji is not rendered correctly in VSCode terminal but is fine in Windows Terminal? |
I honestly don't know too, It seems something is off with my VScode
integrated terminal version of powershell7. No problem, I will just stick
with the windows terminal.
…On Fri, Oct 13, 2023 at 7:44 PM Dongbo Wang ***@***.***> wrote:
hmm, I cannot reproduce this locally with Visual Studio Code terminal, and
my OS version is the same as yours.
[image: old-no-streaming]
<https://user-images.githubusercontent.com/127450/275009421-70807c1e-2afc-41b7-8fb0-5ac6b1b29cd0.gif>
@SeeminglyScience <https://github.com/SeeminglyScience> Any ideas why the
emoji is not rendered correctly in VSCode terminal but is fine in Windows
Terminal?
—
Reply to this email directly, view it on GitHub
<#3832 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6QDMXB6W2T5JVJAM2R4WXDX7GDZRAVCNFSM6AAAAAA55KZNA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRSGAZDQNBTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
cc @andyleejordan since may be integrated shell related. |
@StevenBucher98 from the screenshot this looks like it's happening not in the Extension Terminal but in a VS Code hosted terminal with |
Right, it's not in integrated console from PowerShell extension, but in the VS Code default |
@DanielEmeka2003, one more question, when you pasted the emoji in VS Code terminal, did you use mouse right click, or |
Another thing to check, do you have this setting set to false? "terminal.integrated.windowsEnableConpty": false, If you do, try it as |
"Ctrl+v" |
It is set to true on my vscode. |
True, because it seems to only affect most of my vscode's integrated terminals. |
When I attempt to enter unicode characters to the pwsh console - either as an input to a program or i wish to echo the character, it generally renders something not expected like this: � , then when i try to actually echo the character to the terminal, an exception is thrown. I have four terminals integrated into my vscode:
And they all seem not to render unicode correctly, with Ubuntu being the exception. I do think the exception being thrown is a fault from the integrated version of pwsh only, because for powershell(default version of powershell) although it does not render the unicode correctly it doesn't throw an exception. Oh and I did try to rectify the issue by changing my integrated terminal font to Cascadia Code, but the exception is still thrown regardless. |
The So, the root cause here is
@Tyriar can you please shed some light on this issue? A quick summary of the issue: when pasting an emoji to VSCode terminal, the author found only the high surrogate of the surrogate pair gets pasted into the read-line buffer for PSReadLine ( I cannot reproduce the issue locally with VSCode terminal (1.83.1), but would like to know if you've seen anything similar was reported for VSCode terminal or the xterm.js in general. Thanks! |
I think this is the older version of conpty that ships with Windows not handling it correctly. We are sending the right character there but this is what we get back (this is from the frontend "Terminal" log): I also verified that's what the native API in node-pty is handing off to us ("Pty Host" log): So this will likely get fixed in a future Windows update. |
Prerequisites
Exception report
Screenshot
Environment data
Steps to reproduce
Pasting a lot of unicode encoded emojis from the windows clipboard
Note: This error only occured in my visual studio code integrated terminal verision of powershell7; In my windows terminal version of powershell7, it is working just fine, probably because i manipulated the Json file a bit to use Cascadia Code as the font face, but who knows
Expected behavior
Some sort of delay, then an error message is displayed.
Actual behavior
N/A
The text was updated successfully, but these errors were encountered: