Unicode Escape
Write non-ASCII characters as \uXXXX, U+XXXX or numeric references, and read all of those back.
Result
Good to know
- Only characters above ASCII are escaped. Leaving the readable part readable is what makes the output possible to check by eye.
- \uXXXX cannot hold a character above the basic plane, so an emoji goes out as the surrogate pair it is already stored as — two escapes for one character. The \u{...} and U+ styles write it as one.
- Decoding accepts every style at once, including \xXX and decimal &#NNNN;, so mixed text pasted from several places comes back in one pass.
- Everything happens in your browser. Nothing you paste is sent to the server or stored anywhere.
28 views