Skip to content

Commit 3f639e9

Browse files
Copilotnixel2007
andcommitted
Fix Unicode encoding error on Windows by setting UTF-8 encoding for stdout
Co-authored-by: nixel2007 <[email protected]>
1 parent f3aa83d commit 3f639e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/scripts/verify-archive-size.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import os
22
import sys
3+
import io
4+
5+
# Ensure UTF-8 encoding for stdout on Windows to handle Unicode characters
6+
if sys.platform == 'win32':
7+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
38

49

510
def verify_archive_size(archive_path, min_size_mb=1):

0 commit comments

Comments
 (0)