gin/render
RubenPari e89c60b4e4 fix(render): encode non-BMP runes as UTF-16 surrogate pairs in AsciiJSON
AsciiJSON escaped every non-ASCII rune with \u%04x, but %04x is a
minimum width — for code points above U+FFFF it produced 5+ hex digits,
creating a malformed \uXXXXX escape. JSON \u escapes must be exactly
4 hex digits; non-BMP characters must be encoded as UTF-16 surrogate
pairs per RFC 8259 §7. For example, U+1F600 (😀) was emitted as
\u1f600 (which decodes to U+1F60 + literal '0') instead of
\ud83d\ude00.

Fixes #4688
2026-08-08 11:07:39 +02:00
..