Commit 3e43240
committed
Write rendered files as UTF-8 to fix Windows UnicodeEncodeError
store_response_files opened files with the platform default text codec,
which on Windows is cp1252 and cannot encode characters like 📍 (U+1F4CD).
LLM-generated content containing such characters crashed the render with
UnicodeEncodeError. Specify encoding="utf-8" explicitly, matching how the
rest of file_utils reads text. Add a regression test covering unicode
content.
Fixes CODEPLAIN-P1 parent 0cb870e commit 3e43240
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments