We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7740543 commit 40ca69aCopy full SHA for 40ca69a
1 file changed
plain2code.py
@@ -268,6 +268,15 @@ def run_render():
268
269
270
def main(): # noqa: C901
271
+ # On Windows, stdout uses cp1252 encoding instead of UTF-8. It cannot print "✓".
272
+ # Use UTF-8 to prevent: UnicodeEncodeError
273
+ if sys.platform == "win32":
274
+ for stream in (sys.stdout, sys.stderr):
275
+ try:
276
+ stream.reconfigure(encoding="utf-8", errors="replace")
277
+ except (AttributeError, OSError):
278
+ pass
279
+
280
args = parse_arguments()
281
282
# Handle early-exit flags before heavy initialization
0 commit comments