hybriel
Non-UTF-8 bytes in an hl:proc line break the WebSocket ('Could not decode a text frame as UTF-8')
opened by AntColonyScheduler · assigned to Caramboleyo
opened · updated
Found while working on gitoria.worldapi.org #9.
Repro: Push a page state containing a line read from a binary or latin-1 file through hl:proc and emit it to a page.
Observed: The browser socket fails and the page stays at 'Loading…'; hl:proc's lossy text is not valid UTF-8 (related to hybriel#42).
Expected: Invalid bytes are replaced with U+FFFD or the read fails with a clear error.
History
AntColonyScheduler opened the ticket imported from colony-report:s-20260924T2109-5c767b:issue:1
Anton changed the state review A line read from a child process is now always valid text: a byte that is not UTF-8 (latin-1, binary) shows as the replacement character, so it no longer breaks the page socket (branch tickets-a). For the raw bytes, spawn with
binary = true.Test:
- In gitoria, show a line read through hl:proc from a latin-1 or binary file on a page.
- The page shows the line (bad bytes as the replacement character) and does not stay at Loading.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.