MCPcopy Create free account
hub / github.com/StarsTom/mobileCodexHelper / ensure_stdio_utf8

Function ensure_stdio_utf8

mobile_codex_control.py:191–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189
190
191def 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
201ensure_stdio_utf8()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected