Commit ec36035
committed
Fix Logger.Utils.truncate_n UTF-8 range for two-byte code points
Two-byte UTF-8 sequences start at U+0080 (128), not U+007F (127). The
previous guard `127..0x07FF` overlapped the single-byte clause and could
misclassify U+007F if clause order changed.
Add regression tests for U+007F/U+0080 byte boundaries.1 parent cdbf9b7 commit ec36035
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
0 commit comments