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

tool_cb_wrt: fix invalid unicode for windows console #10890

Closed
wants to merge 1 commit into from

Commits on Jun 6, 2023

  1. tool_cb_wrt: fix invalid unicode for windows console

    - Suppress an incomplete UTF-8 sequence at the end of the buffer.
    
    - Attempt to reconstruct incomplete UTF-8 sequence from prior call(s)
      in current call.
    
    Prior to this change, in Windows console, UTF-8 sequences split between
    two or more calls to the write callback would cause invalid "replacement
    characters" U+FFFD to be printed instead of the actual Unicode
    character. This is because in Windows only UTF-16 encoded characters are
    printed to the console, therefore we convert the UTF-8 contents to
    UTF-16, which cannot be done with partial UTF-8 sequences.
    
    Reported-by: Maksim Arhipov
    
    Fixes curl#9841
    Closes #xxxx
    jay committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    15d4831 View commit details
    Browse the repository at this point in the history