Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cannot round-trip UCS-2 with unpaired surrogates using UTF-16 and surrogateescape #92100

Open
Labels
@DemiMarie

Description

@DemiMarie

Bug report

The following Python code throws aUnicodeEncodeError:

b'\xdc\xff'.decode('UTF-16BE','surrogateescape').encode('UTF-16','surrogateescape')

I would expect that it would returnb'\xdc\xff' instead.

Your environment

  • CPython versions tested on: 3.10.4 from Fedora 35 repository
  • Operating system and architecture: Fedora 35 on x86-64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp