Commit e2ad9b5
committed
fix(uts-skill): make resolve_uts.py file I/O Windows-safe
read_text()/write_text() default to the locale encoding on Windows (often
cp1252, not UTF-8) and apply newline translation, which would both mis-handle
non-ASCII content and rewrite the git-tracked uts-package-mapping.json with
CRLF. Pin the read to utf-8 and write via write_bytes (binary mode does zero
newline translation on any OS or Python version, keeping the file LF — unlike
write_text(newline=...), which needs Python 3.10+). Aligns with the utf-8 reads
already in audit_translation.py.1 parent 0834c45 commit e2ad9b5
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
0 commit comments