diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 4e25befa..86ea12f0 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -54,6 +54,11 @@ def strtobool(val: str) -> bool: def main() -> None: + if sys.platform == 'win32' and hasattr(sys.stdout, 'reconfigure'): + # the encoding on Windows can be a 1-byte charmap, but all CIs support + # utf8, so we hardcode that + sys.stdout.reconfigure(encoding='utf8') + parser = argparse.ArgumentParser( description='Build wheels for all the platforms.', epilog='''