cpython/Modules/_io
Miss Islington (bot) c3bb32de9d
[3.12] gh-124008: Fix calculation of the number of written bytes for the Windows console (GH-124059) (GH-127326)
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 3cf83d91a5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-11-27 16:00:30 +02:00
..
clinic [3.12] gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016) (#115067) 2024-02-06 11:20:16 +01:00
_iomodule.c gh-101819: Isolate _io (#101948) 2023-05-15 09:26:27 +00:00
_iomodule.h gh-101819: Isolate _io (#101948) 2023-05-15 09:26:27 +00:00
bufferedio.c [3.12] gh-95782: Fix io.BufferedReader.tell() etc. being able to return offsets < 0 (GH-99709) (GH-115599) 2024-02-17 14:56:00 +02:00
bytesio.c [3.12] gh-111049: Fix crash during garbage collection of the BytesIO buffer object (GH-111221) (GH-113096) 2023-12-14 10:28:57 +00:00
fileio.c [3.12] gh-114286: Fix maybe-uninitialized warning in Modules/_io/fileio.c (GH-114287) (GH-114288) 2024-01-19 10:58:09 +00:00
iobase.c [3.12] gh-107801: Improve the accuracy of io.IOBase.seek docs (#108268) (#108655) 2023-08-29 22:19:08 +02:00
stringio.c [3.12] gh-127182: Fix io.StringIO.__setstate__ crash when None is the first value (GH-127219) (#127263) 2024-11-25 17:51:21 +00:00
textio.c [3.12] gh-119506: fix _io.TextIOWrapper.write() write during flush (GH-119507) (#119965) 2024-06-19 10:23:29 +00:00
winconsoleio.c [3.12] gh-124008: Fix calculation of the number of written bytes for the Windows console (GH-124059) (GH-127326) 2024-11-27 16:00:30 +02:00