Re:Don’t try to sanitize input – escape output
by nine_k on Thursday February 27, 2020 @09:55AM
(#22433754)
See also: wtf-8 encoding, used by Mozilla for potentially broken Unicode input.
[ Parent
| on HN ]
Re:Don’t try to sanitize input – escape output
by klodolph on Thursday February 27, 2020 @10:34AM
(#22434124)
WTF-8 is for a very specific application—to encode in an 8-bit sequence a 16-bit sequence which is nominally UTF-16 but may contain unpaired surrogates. It’s not used for weird user inputs, instead, it’s used for e.g. interop with the Win32 API.