diff --git a/lib/internal/util.js b/lib/internal/util.js index ae8b1e0b649486..238eb65891365c 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -112,15 +112,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: