• Pieter P's avatar
    Fix Unicode support for ostream redirects (#2982) · 0c93a0f3
    Pieter P authored
    * Crash when printing Unicode to redirected cout
    Add failing tests
    
    * Fix Unicode crashes redirected cout
    
    * pythonbuf::utf8_remainder check end iterator
    
    * Remove trailing whitespace and formatting iostream
    
    * Avoid buffer overflow if ostream redirect races
    This doesn't solve the actual race, but at least it now has a much lower
    probability of reading past the end of the buffer even when data races
    do occur.
    0c93a0f3
test_iostream.py 7.77 KB