Cannot round-trip UCS-2 with unpaired surrogates using UTF-16 and surrogateescape
オープン
まだ誰も着手していません。
docs
topic-unicode
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
The following Python code throws a UnicodeEncodeError:
b'\xdc\xff'.decode('UTF-16BE', 'surrogateescape').encode('UTF-16', 'surrogateescape')
I would expect that it would return b'\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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、報告された UTF-16BE デコードおよび UTF-16 エンコードの snippet を、指定された CPython バージョンで実行し、その後、関連するエンコーディングと surrogateescape の挙動を追跡します。完了の条件は、バイト列 b'\xdc\xff' が UnicodeEncodeError なしでラウンドトリップし、報告された期待値に照らして挙動が確認されていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- internationalization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100