Skip to content

Windows: WindowsConsoleIO produces mojibake replacement characters #110913

Closed
@sorgloomer

Description

@sorgloomer

Bug report

Bug description:

Hi! The following code reliably produces some unicode replacement characters �, on Windows, always in the same location. Works fine on Linux.

This report is a follow-up to this other one: #82052

A fix was already attempted, but as you can see, there are still some cases uncovered.

Example 1

print('é'*20001)

image

Example 2

This is an attempt at making a shorter example, and a bit of a stretch goal.

python -c "import sys;[sys.stdout.buffer.raw.write(b) for b in [b'\xc3', b'\xa9',b'\xc3\xa9']]"

image

CPython versions tested on:

3.10, 3.12

Operating systems tested on:

Linux, Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions