Skip to content

Commit 6cbb791

Browse files
committed
fix(validate): force UTF-8 stdout so status glyphs survive cp949 consoles
The pass/fail summary prints checkmark and cross glyphs; on legacy Windows consoles (cp949) these raise UnicodeEncodeError. Reconfigure stdout to UTF-8 best-effort before printing.
1 parent cff705d commit 6cbb791

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/validate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ def validate() -> list[str]:
242242

243243

244244
def run() -> int:
245+
# The ✅/❌ status glyphs must not crash on legacy consoles (e.g. cp949).
246+
try:
247+
sys.stdout.reconfigure(encoding="utf-8") # type: ignore[union-attr]
248+
except Exception:
249+
pass
245250
errors = validate()
246251
if errors:
247252
print(f"❌ Data validation failed ({len(errors)} issue(s)):")

0 commit comments

Comments
 (0)