Skip to content
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

An error occured when I tried to paste the Russian flag emoji (🇷🇺) #3989

Closed
2 of 3 tasks
GEOEGII555 opened this issue Apr 6, 2024 · 1 comment
Closed
2 of 3 tasks
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@GEOEGII555
Copy link

GEOEGII555 commented Apr 6, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Произошла ошибка. Сообщите об этой ошибке, указав данные ниже.
Напишите в GitHub: https://github.com/PowerShell/PSReadLine/issues/new
### Среда
PSReadLine: 2.0.0
PowerShell: 5.1.22621.2506
ОС: Microsoft Windows 10.0.22631
Последние 168 ключей

 UpArrow Enter
 g i t Spacebar a d d Spacebar . Enter
 g i t Spacebar c o m m i t Spacebar - Backspace Ctrl+w Ctrl+w Ctrl+w n p m Spacebar r e b u i l d Enter
 n p m Spacebar u n Backspace Backspace r e m o v e Spacebar @ t y p e s / n o d e Enter
 UpArrow Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w Ctrl+w g i t Spacebar a d d Spacebar . Enter
 g i t Spacebar c o m m m i Backspace Backspace i t Spacebar - m Spacebar " u p d a t e " Enter
 g i t Spacebar p u s h Enter
 g i t Spacebar a d d Spacebar . Enter
 g i t Spacebar c o m m i t Spacebar - Spacebar Backspace m Spacebar ' � ' Enter

Исключение

System.Text.EncoderFallbackException: Не удается преобразовать символ Юникода \uD83C по индексу 15 в формат заданной кодовой страницы.
   в System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index)
   в System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars)
   в System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS baseEncoder)
   в System.Text.EncoderNLS.GetBytes(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, Boolean flush)
   в System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   в System.IO.StreamWriter.Dispose(Boolean disposing)
   в System.IO.TextWriter.Dispose()
   в Microsoft.PowerShell.PSConsoleReadLine.<>c__DisplayClass83_0.<WriteHistoryRange>b__0()
   в Microsoft.PowerShell.PSConsoleReadLine.WithHistoryFileMutexDo(Int32 timeout, Action action)
   в Microsoft.PowerShell.PSConsoleReadLine.MaybeAddToHistory(String result, List`1 edits, Int32 undoEditIndex, Boolean fromDifferentSession, Boolean fromInitialRead)
   в Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   в Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)


### Screenshot

N/A

### Environment data

```console
PS Version: 5.1.22621.2506
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0
PSReadLine EditMode: Windows
OS: 10.0.22621.2860 (WinBuild.160101.0800)
BufferWidth: 166
BufferHeight: 14

Steps to reproduce

Write git commit -m '

Paste this: 🇷🇺

Expected behavior

It should just paste the flag.

Actual behavior

It throws that exception. When I press enter to run the command, one of the characters dissapear, making the flag be a missing character instead.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 6, 2024
@daxian-dbw
Copy link
Member

Close as a duplicate of #1329

@daxian-dbw daxian-dbw added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants