Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-124008: Fix calculation of the number of written bytes for the Windows console (GH-124059) #127325

Merged
merged 2 commits into from
Nov 30, 2024

Commits on Nov 27, 2024

  1. pythongh-124008: Fix calculation of the number of written bytes for t…

    …he Windows console (pythonGH-124059)
    
    Since MultiByteToWideChar()/WideCharToMultiByte() is not reversible if
    the data contains invalid UTF-8 sequences, use binary search to
    calculate the number of written bytes from the number of written
    characters.
    
    Also fix writing incomplete UTF-8 sequences.
    
    Also fix handling of memory allocation failures.
    (cherry picked from commit 3cf83d9)
    
    Co-authored-by: Serhiy Storchaka <[email protected]>
    serhiy-storchaka authored and miss-islington committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    922d938 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2024

  1. Configuration menu
    Copy the full SHA
    eaa0d57 View commit details
    Browse the repository at this point in the history