Ref babel/babel#14327 (comment) @wooorm
This might be another one to spec in JSX btw, because there’s likely divergence between implementations. There are a bunch of different things not allowed by XML/HTML/markdown (such as \0 or lone surrogates)
It looks like currently Babel and TS behave the same (they translate � to \0 and � to \uD800). I didn't test other parsers.