coolaj86 / TextEncoderLite_tmp

Polyfill for the Encoding Living Standard's API
Apache License 2.0
30 stars 19 forks source link

Wrong with 4 bytes UTF-8 char #16

Open waitingsong opened 5 years ago

waitingsong commented 5 years ago

It got wrong result during encoding 4 bytes UTF-8 char. Such as:

'\uD842\uDFB7'
'\u{D842}\u{DFB7}'
 '\u{20BB7}'

expected: 8KCutw== got: 8JCutw==