diff --git a/lib/internal/util.js b/lib/internal/util.js index 4ada8dd0cc16f0..8528ba61ad8dea 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: