diff --git a/btoa/index.js b/btoa/index.js index 8bfc1ad..350cd4b 100644 --- a/btoa/index.js +++ b/btoa/index.js @@ -2,7 +2,7 @@ "use strict"; function btoa(str) { - return new Buffer(str, 'utf8').toString('base64'); + return new Buffer(str, 'binary').toString('base64'); } module.exports = btoa;