Commit 57f49ad
fix(scoop): handle non-UTF-8 encoding in scoop list output (#1255)
## Description
Fix tab completion failure for 'scoop list' on Windows when scoop output
contains non-UTF-8 characters.
## Problem
On Windows with non-UTF-8 locales (e.g., Chinese Windows using GBK
encoding), the `scoop list` command may output text in the system's
local encoding, causing the completion to fail silently.
## Solution
Use `decode utf-8` to properly handle the output encoding, ensuring the
completion works correctly regardless of locale settings.
## Testing
Tested on Windows with Chinese locale where scoop outputs GBK-encoded
text.
Co-authored-by: hhfgy1 <hhf@gspc.com>1 parent 018fe3c commit 57f49ad
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | 169 | | |
172 | | - | |
| 170 | + | |
173 | 171 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
181 | 178 | | |
182 | 179 | | |
183 | | - | |
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
| |||
0 commit comments