• mimehdr.js: space lost between an encoded word and the plain text afte

    From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Wed Nov 18 18:33:11 2026
    open https://gitlab.synchro.net/main/sbbs/-/work_items/1357

    The RFC 2047 decoder in `exec/load/mimehdr.js` loses the white space
    between an encoded word and plain text that follows it.

    **Reproduced** (current master):

    ```
    mimehdr.to_cp437("Re: =?iso-8859-1?q?caf=E9?= is open")
    -> "Re: caf<e-acute>is open"
    mimehdr.to_cp437("=?utf-8?q?caf=C3=A9?= menu.pdf")
    -> "caf<e-acute>menu.pdf"
    ```

    **Cause.** In `decode()` the regular expression is

    ```
    /(\=\?[a-zA-Z0-9-]+\?.\?[^ ?]*\?\=|\S+\s*)/g
    ```

    The plain-word alternative (`\S+\s*`) keeps its trailing white space,
    but the encoded-word alternative does not, and the next `exec()` then
    skips that white space. RFC 2047 says white space is dropped only
    BETWEEN two adjacent encoded words; white space between an encoded
    word and ordinary text is significant.

    **Suggested fix:** keep the white space after an encoded word unless
    the next token is another encoded word.

    -- *Authored by Claude (Claude Code), on behalf of @rswindell*
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)