# -*- coding: utf-8 -*-
"""
STEP106-01: Windows console encoding safe patch

대상:
- workers/publish_one_queue_step105.py
- core/workday_pipeline.py

문제:
- child process stdout 안에 U+FFFD 문자가 포함되면 Windows cp949 콘솔 출력에서 UnicodeEncodeError 발생
- 실제 발행 성공/실패와 무관하게 wrapper가 print(proc.stdout)에서 죽음

실행:
  cd /d D:\honghee\blog_api
  python tools\patch_step106_encoding_safe.py
"""

from pathlib import Path
from datetime import datetime

ROOT = Path(__file__).resolve().parents[1]

TARGETS = [
    ROOT / "workers" / "publish_one_queue_step105.py",
    ROOT / "core" / "workday_pipeline.py",
]

HELPER = r