mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Unpaired surrogate code points have no representation in UTF8. Therefore, such code points are just "random" output that is unreadable. Instead, escape the code points similar to C0 and C1 control characters. Refs: https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/41001 Reviewed-By: James M Snell <jasnell@gmail.com>