镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Character based key handlers are not surrogate pair aware #1587

Open

Description

Environment

PS version: 7.0.0
PSReadline version: 2.0.0
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 7.0.0.0
HostName: ConsoleHost
BufferWidth: 140
BufferHeight: 3000

Exception report

Steps to reproduce

  1. Copy a surrogate pair to clipboard (like 😀)
  2. In a terminal that supports emojis, paste it
  3. Press Backspace

Expected behavior

The buffer is empty.

Actual behavior

The buffer contains the high surrogate of the pasted surrogate pair.


This also applies to most character level handlers, including:

  • ForwardChar
  • BackwardChar
  • DeleteChar
  • Delete

And their VI variants.

Activity

  1. ghost added
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on Jun 5, 2020
  2. daxian-dbw commented on Jun 10, 2020

    @daxian-dbw
    Member

    For me later:
    Reference to the related issue: #1329

  3. SeeminglyScience commented on Aug 25, 2020

    @SeeminglyScience
    CollaboratorAuthor

    Steven Penny (@nu8) that's not especially on topic to be honest. Most folks aren't going to stop using PowerShell so that they can type emojis a little better. Either way though this isn't really the place to pitch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions