@@ -139,10 +139,6 @@ def _decode(stdout):
139139 # uses the ASCII subset, so we can safely guess a wrong code page for it. Errors
140140 # from such an environment can contain any text, but unlike WSL's own messages,
141141 # they go to stderr, not stdout. So we can try the system ANSI code page first.
142- # (Console programs often use the OEM code page, but the ACP seems more accurate
143- # here. For example, on en-US Windows with the original system code page but the
144- # display language set to fr-FR, the message, if not UTF-16LE, is windows-1252,
145- # same as the ACP, while the OEMCP is 437, which can't decode its accents.)
146142 acp = _get_windows_ansi_encoding ()
147143 try :
148144 return stdout .decode (acp )
@@ -151,10 +147,7 @@ def _decode(stdout):
151147 except LookupError as error :
152148 log .warning ("%s" , str (error )) # Message already says "Unknown encoding:".
153149
154- # Assume UTF-8. If invalid, substitute Unicode replacement characters. (For
155- # example, on zh-CN Windows set to display fr-FR, errors from WSL itself, if not
156- # UTF-16LE, are in windows-1252, even though the ANSI and OEM code pages both
157- # default to 936, and decoding as code page 936 or as UTF-8 both have errors.)
150+ # Assume UTF-8. If invalid, substitute Unicode replacement characters.
158151 return stdout .decode ("utf-8" , errors = "replace" )
159152
160153
0 commit comments