From e236ef830db9e94a720edf249d0c2dee50c6499f Mon Sep 17 00:00:00 2001 From: Andrew Malachowski <10599712-amalachowski@users.noreply.gitlab.com> Date: Thu, 1 Sep 2022 21:39:45 +0000 Subject: [PATCH] Improve cp65001 compat in cpython < 3.3 --- waflib/Utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/waflib/Utils.py b/waflib/Utils.py index 669490ca..31618cb8 100644 --- a/waflib/Utils.py +++ b/waflib/Utils.py @@ -452,6 +452,8 @@ def console_encoding(): pass else: if codepage: + if 65001 == codepage and sys.version_info < (3, 3): + return 'utf-8' return 'cp%d' % codepage return sys.stdout.encoding or ('cp1252' if is_win32 else 'latin-1')