fix: 히스토리 검증 훅 UTF-8 강제 + 측점 맵핑 문서 추가

- guard-history-fields.py: Windows cp949 stdin에서 한글 필드 정규식
  미스매치로 발생하던 false block 및 에러 mojibake 수정 (stdin/stderr UTF-8 강제)
- docs/geo-station-mapping.html: 지리정보·측점·프레임 맵핑 구조 +
  station 기준 재생 설계 문서
- docs/history: 2026-06-17 맵핑 구조 분석 기록

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
minsung
2026-06-17 09:31:34 +09:00
parent c1b6f99032
commit eaf7134309
3 changed files with 350 additions and 0 deletions

View File

@@ -9,6 +9,15 @@ import json
import re
import os
# Windows 기본 stdin/stderr 인코딩(cp949)에서 UTF-8 한글이 깨져
# 정규식 매칭 실패(false block) + 에러 출력 mojibake가 발생.
# stdin/stderr를 UTF-8로 강제해 한글 필드를 정상 검사/출력한다.
for _stream in (sys.stdin, sys.stderr):
try:
_stream.reconfigure(encoding="utf-8")
except Exception:
pass
# ── path.json 로드 ────────────────────────────────────────────────────────────
HOOKS_DIR = os.path.dirname(os.path.abspath(__file__))
PATH_JSON = os.path.join(HOOKS_DIR, "path.json")