diff --git a/lib/internal/util.js b/lib/internal/util.js index 17af1bbcc5..ab17d78204 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -147,15 +147,15 @@ exports.normalizeEncoding = function normalizeEncoding(enc) { case 'utf-8': return 'utf8'; case 'ucs2': - case 'utf16le': case 'ucs-2': + case 'utf16le': case 'utf-16le': return 'utf16le'; + case 'latin1': case 'binary': return 'latin1'; case 'base64': case 'ascii': - case 'latin1': case 'hex': return enc; default: