-
Notifications
You must be signed in to change notification settings - Fork 304
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
Visual studio code #3793
Comments
Thanks for the issue @vaibhavupase ! Can you try upgrading to PSReadLine's latest stable version 2.2.6 with this command:
And see if this resolves your issue? If this does not solve your issue, please provide reproducible steps for getting this exception. |
Close as a duplicate of #2358 |
This is a duplicate of #3832 and is actually an issue with the older version of conpty that ships with Windows -- the � shown in VSCode terminal was because only the high surrogate of the surrogate pair that represents the emoji was pasted into the read-line buffer, due to the older version of conpty not handling it correctly. See #3832 (comment) and the replying comment from @Tyriar for details. |
Prerequisites
Exception report
Exception
Screenshot
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
Environment
PSReadLine: 2.0.0
PowerShell: 5.1.22621.1778
OS: Microsoft Windows 10.0.22621
Last 200 Keys
Exception
Exception
Steps to reproduce
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
Environment
PSReadLine: 2.0.0
PowerShell: 5.1.22621.1778
OS: Microsoft Windows 10.0.22621
Last 200 Keys
Exception
( $ ? ) Spacebar { Spacebar . \ L o o p Spacebar } Enter
c d Spacebar " d : \ c w h Spacebar Spacebar C \ v a i b h a v C \ B i n a r y B r a i n s \ " Spacebar ; Spacebar i f Spacebar ( $ ? ) Spacebar { Spacebar g c c Spacebar L o o p . c Spacebar - o Spacebar L o o p Spacebar } Spacebar ; Spacebar i f Spacebar ( $ ? ) Spacebar { Spacebar . \ L o o p Spacebar } Enter
c d Spacebar " d : \ c w h Spacebar Spacebar C \ v a i b h a v C \ B i n a r y B r a i n s \ " Spacebar ; Spacebar i f Spacebar ( $ ? ) Spacebar { Spacebar g c c Spacebar L o o p . c Spacebar - o Spacebar L o o p Spacebar } Spacebar ; Spacebar i f Spacebar ( $ ? ) Spacebar { Spacebar . \ L o o p Spacebar } Enter
System.Text.EncoderFallbackException: Unable to translate Unicode character \uD83E at index 0 to specified code page.
at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index)
at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars)
at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS baseEncoder)
at System.Text.EncoderNLS.GetBytes(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, Boolean flush)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at Microsoft.PowerShell.PSConsoleReadLine.<>c__DisplayClass83_0.b__0()
at Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
at Microsoft.PowerShell.PSConsoleReadLine.MaybeAddToHistory(String result, List`1 edits, Int32 undoEditIndex, Boolean fromDifferentSession, Boolean fromInitialRead)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
Actual behavior
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
Environment
PSReadLine: 2.0.0
PowerShell: 5.1.22621.1778
OS: Microsoft Windows 10.0.22621
Last 200 Keys
Exception
The text was updated successfully, but these errors were encountered: