jenkins-bot has submitted this change and it was merged.
Change subject: Fall back to utf-8 console encoding ......................................................................
Fall back to utf-8 console encoding
Bug: T93474 Change-Id: Iec28824bd74377c33a08964307449cebc90279e4 --- M pywikibot/config2.py 1 file changed, 6 insertions(+), 5 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 0ef584b..13c4578 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -1007,12 +1007,13 @@ "Please inform the maintainers if you depend on it." % _key, _ConfigurationDeprecationWarning)
-# Fix up default console_encoding +# If we cannot auto-detect the console encoding (e.g. when piping data) +# assume utf-8. On Linux, this will typically be correct; on windows, +# this can be an issue when piping through more. However, the behavior +# when redirecting to a file utf-8 is more reasonable. + if console_encoding is None: - if sys.platform == 'win32': - console_encoding = 'cp850' - else: - console_encoding = 'iso-8859-1' + console_encoding = 'utf-8'
# Fix up transliteration_target if transliteration_target == 'not set':
pywikibot-commits@lists.wikimedia.org