2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00

Improve cp65001 compat in cpython < 3.3

This commit is contained in:
Andrew Malachowski 2022-09-01 21:39:45 +00:00 committed by Thomas Nagy
parent fae5693f41
commit f69602d1df

View File

@ -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')