A well-tested WTF-8 encoder/decoder written in JavaScript.
utf8, utf16, wtf8, and wtf16 decoding without strings