llagy009
685c22dfb7
fix(irc): chunk PRIVMSG on UTF-16 boundary to avoid lone surrogates ( #96572 )
...
* fix(irc): chunk PRIVMSG on UTF-16 boundary to avoid lone surrogates
sendPrivmsg split long messages with String.slice on a UTF-16 code-unit
index, so an emoji (or other astral character) straddling the split
point was cut into a lone high/low surrogate, sending broken bytes in
the PRIVMSG to the IRC server.
Slice each chunk with sliceUtf16Safe so a surrogate pair is never split.
When the budget is too small to fit even the leading astral character,
emit that character whole so chunking still makes progress.
Adds a socket-level test (fake net/tls socket) asserting no PRIVMSG
chunk contains a lone surrogate, including the one-code-unit budget
edge case, while the existing space-preferring split is preserved.
* refactor(irc): make surrogate-safe chunking direct
* fix(irc): preserve one-unit chunk limits
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com >
2026-07-05 12:14:05 -07:00
..
2026-07-04 14:56:50 -04:00
2026-07-05 05:48:35 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 14:56:50 -04:00
2026-07-04 16:34:47 -07:00
2026-07-05 01:44:56 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 21:16:26 -07:00
2026-07-02 21:16:26 -07:00
2026-07-05 10:57:19 -07:00
2026-07-04 11:35:55 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 05:33:11 -07:00
2026-07-05 09:32:37 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 10:57:19 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 08:00:23 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 07:43:43 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-07-05 10:57:19 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 21:16:26 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 21:16:26 -07:00
2026-07-01 20:42:25 -07:00
2026-07-04 20:28:52 -04:00
2026-07-04 14:56:50 -04:00
2026-07-04 12:47:10 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-07-05 10:57:19 -07:00
2026-07-05 02:34:08 -04:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 10:57:19 -07:00
2026-07-01 08:55:41 -07:00
2026-07-05 12:14:05 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 20:28:52 -04:00
2026-06-30 11:31:08 -07:00
2026-07-04 14:56:50 -04:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-07-04 16:50:44 -07:00
2026-07-05 11:50:44 -07:00
2026-07-05 05:33:11 -07:00
2026-07-05 08:00:23 -04:00
2026-06-30 11:31:08 -07:00
2026-07-05 11:12:55 -07:00
2026-07-04 14:56:50 -04:00
2026-07-05 01:44:56 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 02:08:35 -07:00
2026-07-04 02:08:35 -07:00
2026-07-03 17:09:30 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 21:16:26 -07:00
2026-07-04 20:28:52 -04:00
2026-06-30 15:54:12 -07:00
2026-07-04 16:45:07 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 22:12:53 -07:00
2026-07-04 14:56:50 -04:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-07-05 10:57:19 -07:00
2026-06-30 11:31:08 -07:00
2026-07-01 23:01:46 +08:00
2026-07-03 17:09:30 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 22:12:53 -07:00
2026-07-02 21:16:26 -07:00
2026-07-04 01:51:03 -07:00
2026-06-30 15:54:12 -07:00
2026-07-05 08:11:38 -07:00
2026-07-05 02:22:11 -07:00
2026-07-05 10:57:19 -07:00
2026-07-04 11:48:18 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 08:00:23 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 15:54:12 -07:00
2026-06-30 11:31:08 -07:00
2026-07-02 21:16:26 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 20:28:52 -04:00
2026-07-05 01:48:57 -07:00
2026-07-01 04:12:55 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-06-29 15:41:26 -07:00
2026-07-04 14:56:50 -04:00
2026-07-05 10:57:19 -07:00
2026-06-30 11:31:08 -07:00
2026-06-24 19:08:22 -05:00
2026-07-04 14:56:50 -04:00
2026-07-03 17:09:30 -07:00
2026-07-02 22:12:53 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 14:56:50 -04:00
2026-06-30 11:31:08 -07:00
2026-07-01 19:49:38 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 12:05:01 -07:00
2026-07-04 11:35:55 -07:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-04 12:47:10 -07:00
2026-07-04 16:38:13 -07:00
2026-07-05 06:50:28 -07:00
2026-07-04 14:56:50 -04:00
2026-07-05 01:56:40 -04:00
2026-06-30 11:31:08 -07:00
2026-06-30 11:31:08 -07:00
2026-07-05 10:57:19 -07:00
2026-07-04 16:50:44 -07:00
2026-07-05 01:56:40 -04:00