X Tutup
The Wayback Machine - https://web.archive.org/web/20250528022722/https://github.com/python/cpython/issues/94527
Skip to content

Possibly Wrong json encoding and decoding of surrogated pairs #94527

Open
@zommiommy

Description

@zommiommy

Bug report
Hi, I found a small non-urgent bug so feel free to ignore it.

import json
assert '\udb0a\udfdf' == json.loads(json.dumps('\udb0a\udfdf'))

results in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AssertionError

Your environment
I managed to reproduce it in your maylinux2010 docker for the versions 3.6, 3.7, 3.8, 3.9, 3.10.

sudo docker run -it manylinux2010

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup