SIGN IN SIGN UP

fix(lib): decode UTF-16 surrogate pairs with input endianness (#5912)

Problem: Parsing UTF-16BE source containing supplementary-plane characters, such as `let emoji = "😀"`, decoded the emoji as two isolated surrogates on little-endian hosts, causing incorrect lexer lookahead and potentially shifted token boundaries.

Soluton: Fix the trailing surrogate byte-order conversion in both UTF-16LE and UTF-16BE decoders and adds a regression test for U+1F600.
Y
Yudai Takada committed
351bd71e528659938243e324ef91cfa1515827ea
Parent: c206ad1
Committed by GitHub <noreply@github.com> on 9/3/2026, 6:21:08 AM