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

backspace breaks apart multibyte characters #14084

Closed
aetonsi opened this issue Sep 26, 2022 · 4 comments
Closed

backspace breaks apart multibyte characters #14084

aetonsi opened this issue Sep 26, 2022 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Won't-Fix We're just really obstinate about this. There's probably a good reason.

Comments

@aetonsi
Copy link

aetonsi commented Sep 26, 2022

Windows Terminal version

1.14.2282.0

Windows build number

10.0.22000.978

Other Software

powershell core

Name             : ConsoleHost
Version          : 7.2.6
InstanceId       : 098117ae-601b-414f-851f-2c7afccd06c4
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : it-IT
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Steps to reproduce

  1. copy multibyte character to clipboard, for example 🙂
  2. paste it in the terminal
  3. press backspace

Expected Behavior

The backspace should delete the entire multibyte character, so typing echo "🙂<backspace>" <enter> in pwsh would be the same as typing echo "" <enter> (should print an empty string).

Actual Behavior

When pressing backspace, the character is instead broken in a couple of � � characters, and the backspace deletes the second �, leaving the first one, which, if sent to pwsh, breaks everything (see here: PowerShell/PSReadLine#2358 (comment))

@aetonsi aetonsi added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 26, 2022
@aetonsi
Copy link
Author

aetonsi commented Sep 26, 2022

might be related to #12537 or #1802

@DHowett
Copy link
Member

DHowett commented Sep 26, 2022

Thanks for the report! Unfortunately, the handling of multi-byte sequences at a shell's "input line" is up to that shell. You may need to reopen this issue over on the PowerShell or PSReadline repository. Sorry!

@DHowett DHowett closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2022
@DHowett DHowett added the Resolution-Won't-Fix We're just really obstinate about this. There's probably a good reason. label Sep 26, 2022
@aetonsi
Copy link
Author

aetonsi commented Sep 26, 2022

FYI and future reference see here: PowerShell/PSReadLine#2358 (comment)

@DHowett
Copy link
Member

DHowett commented Sep 26, 2022

Thank you! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Won't-Fix We're just really obstinate about this. There's probably a good reason.
Projects
None yet
Development

No branches or pull requests

2 participants