Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e00fffc

Browse filesBrowse files
committed
Shorten comments on _decode steps
This removes the parenthesized examples from the per-step comments in the WinBashStatus._decode helper.
1 parent 3303c74 commit e00fffc
Copy full SHA for e00fffc

File tree

1 file changed

+1
-8
lines changed
Filter options

1 file changed

+1
-8
lines changed

‎test/test_index.py

Copy file name to clipboardExpand all lines: test/test_index.py
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.