Content-Length: 308110 | pFad | https://github.com/python/cpython/issues/99612

DE PyUnicode_DecodeUTF8Stateful() does not set *consumed for ASCII-only string · Issue #99612 · python/cpython · GitHub
Skip to content

PyUnicode_DecodeUTF8Stateful() does not set *consumed for ASCII-only string #99612

@serhiy-storchaka

Description

@serhiy-storchaka

PyUnicode_DecodeUTF8Stateful() should save the number of successfully decoded bytes in *consumed. But if all bytes are in the ASCII range, it uses a fast path and does not set *consumed.

It was found during writing coverage tests for Unicode C API (#99593).

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/99612

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy