Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commite00fffc

Browse files
committed
Shorten comments on _decode steps
This removes the parenthesized examples from the per-step commentsin the WinBashStatus._decode helper.
1 parent3303c74 commite00fffc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

‎test/test_index.py

Lines 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
returnstdout.decode(acp)
@@ -151,10 +147,7 @@ def _decode(stdout):
151147
exceptLookupErroraserror:
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
returnstdout.decode("utf-8",errors="replace")
159152

160153

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp