()
| 189 | |
| 190 | |
| 191 | def ensure_stdio_utf8() -> None: |
| 192 | for stream_name in ("stdout", "stderr"): |
| 193 | stream = getattr(sys, stream_name, None) |
| 194 | if stream and hasattr(stream, "reconfigure"): |
| 195 | try: |
| 196 | stream.reconfigure(encoding="utf-8", errors="replace") |
| 197 | except ValueError: |
| 198 | pass |
| 199 | |
| 200 | |
| 201 | ensure_stdio_utf8() |
no outgoing calls
no test coverage detected