Commit 7e6b8b2
fix(md): decode UTF-8 correctly when rendering markdown in browser
atob() returns a Latin-1 binary string, so multi-byte UTF-8 characters
(like em dashes) were rendered as mojibake (e.g. â€" instead of —).
Use TextDecoder to properly convert the base64-decoded bytes to UTF-8.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 8734bf6 commit 7e6b8b2
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9139 | 9139 | | |
9140 | 9140 | | |
9141 | 9141 | | |
9142 | | - | |
| 9142 | + | |
9143 | 9143 | | |
9144 | 9144 | | |
9145 | 9145 | | |
| |||
9204 | 9204 | | |
9205 | 9205 | | |
9206 | 9206 | | |
9207 | | - | |
| 9207 | + | |
| 9208 | + | |
| 9209 | + | |
| 9210 | + | |
9208 | 9211 | | |
9209 | 9212 | | |
9210 | 9213 | | |
| |||
0 commit comments