string_decoder: align UTF-8 handling with V8
V8 5.5 changed how invalid characters are handled and it now appears to follow the WHATWG Encoding standard, where all of an invalid character's bytes are replaced by a single replacement character (\ufffd) instead of replacing each invalid byte with separate replacement characters. Example: the byte sequence 0xF0,0xB8,0x41 is decoded as '\ufffdA' in V8 5.5, but is decoded as '\ufffd\ufffdA' in previous versions of V8. PR-URL: https://github.com/nodejs/node/pull/9618 Reviewed-By:Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
parent
007386ee
Please register or sign in to comment