添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

adding an emoji triggered an exception #1282

@BananaAcid

Description

First I tried copy and pasting to the console (used some parts of the config file).

Then I added an emoji using win + . , added a space between these ?? that appeared instead of the emoji and pressed enter

Was wondering, why an emoji would not show up on the terminal.

Output

Letzte 200 Tasten:
 5 8 - b 9 8 9 - 0 a 9 9 8 e c 4 4 1 b 8 Ctrl+Alt+} " , Ctrl+Enter Space Space Space Space Space Space Space Space " h i d d e n " : Space f a l s e , Ctrl+Enter Space Space Space Space Space Space Space Space " n a m e " : Space " A z u r e Space C l o u d Space S h e l l " , Ctrl+Enter Space Space Space Space Space Space Space Space " s o u r c e " : Space " W i n d o w s . T e r m i n a l . A z u r e " , Ctrl+Enter Space Space Space Space Space Space Space Space " f o n t F a c e " : Space " F i r a Space C o d e " , Ctrl+Enter Space Space Space Space Space Space Space Space " f o n t S i z e " : Space 8 Ctrl+Enter Space Space Space Space Space Space Ctrl+Alt+} Escape : D Enter
 Escape Ctrl+Alt+? ? Enter
Ausnahme:
System.Text.EncoderFallbackException: Das Unicode-Zeichen \uDD23 im Index 0 kann nicht in die angegebene Codepage übersetzt werden.
   bei System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index)
   bei System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars)
   bei System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS baseEncoder)
   bei System.Text.EncoderNLS.GetBytes(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, Boolean flush)
   bei System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   bei System.IO.StreamWriter.Dispose(Boolean disposing)
   bei System.IO.TextWriter.Dispose()
   bei Microsoft.PowerShell.PSConsoleReadLine.<>c__DisplayClass81_0.<WriteHistoryRange>b__0()
   bei Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
   bei Microsoft.PowerShell.PSConsoleReadLine.MaybeAddToHistory(String result, List`1 edits, Int32 undoEditIndex, Boolean fromDifferentSession, Boolean fromInitialRead)
   bei Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   bei Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Environment data

PS version: 5.1.18362.145
PSReadline version: 2.0.0-beta2
os: 10.0.18362.530 (WinBuild.160101.0800)
PS file version: 10.0.18362.530 (WinBuild.160101.0800)
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 154
BufferHeight: 39

Steps to reproduce or exception report

"Type" an emoji, add a space between the 2 ?? and press enter.