You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the value of str in node is ����\u0000\u0010JFIF\u0000\u0001 which would suggest that the issue has to do with how new Buffer handles characters in text.
255 is never valid in a UTF-8 byte sequence. It probably worked by accident but invalid UTF-8 is replaced with U+FFFD (the replacement character) as of node.js v0.10.29. The V8 UTF-8 decoder became stricter in v3.x so that might be a factor as well.
I don't think there is anything to do here except make a note of it somewhere in the documentation..
Activity
bnoordhuis commentedon Aug 10, 2015
255 is never valid in a UTF-8 byte sequence. It probably worked by accident but invalid UTF-8 is replaced with U+FFFD (the replacement character) as of node.js v0.10.29. The V8 UTF-8 decoder became stricter in v3.x so that might be a factor as well.
I don't think there is anything to do here except make a note of it somewhere in the documentation..
bnoordhuis commentedon Aug 10, 2015
That's
0xEF 0xBF 0xBDas UTF-8, by the way; the repeated pattern you see in the test's output.[-]new Buffer doens't handle unicode well[/-][+]new Buffer doesn't handle unicode well[/+]calvinmetcalf commentedon Aug 11, 2015
fixed on the browserify end