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

rename computer using emojis #4271

Closed
3 tasks done
WilliamTIII opened this issue Nov 13, 2024 · 1 comment
Closed
3 tasks done

rename computer using emojis #4271

WilliamTIII opened this issue Nov 13, 2024 · 1 comment

Comments

@WilliamTIII
Copy link

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

I want to name my win11 vm "🔥🔥" and that wasn't working. I went to delete the fire emojis and it took two keystrokes, the first backspace over the fire turned it into a �, so I did that to the other fire emoji then ran the command below and got the result below that. 

Ultimately I want my laptop to be lit


PS C:\Users\User> Rename-Computer -NewName "��"

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.3880
OS: Microsoft Windows 10.0.22621
Last 41 Keys

 r e n a m e - c Tab Spacebar - n e w n a Tab Spacebar " f Backspace � � � � Backspace Backspace Backspace Backspace � � � � " Enter
 UpArrow LeftArrow Backspace LeftArrow Backspace Enter

Exception

System.Text.EncoderFallbackException: Unable to translate Unicode character \uD83D at index 26 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.<WriteHistoryRange>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)


### Screenshot

![image](https://github.com/user-attachments/assets/997814fd-7b9d-429d-9fdf-be4082f62bd9)


### Environment data

```console
PS Version: 5.1.22621.3880
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.0.0
PSReadLine EditMode: Windows
OS: 10.0.22621.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 30

Steps to reproduce

rename-computer -newname "��" -force

Expected behavior

I want my computername to be emojis

Actual behavior

the error above

@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 Nov 13, 2024
@daxian-dbw
Copy link
Member

Close as a duplicate of #1329

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants