From 12fe071abf77d73f42b7db876de1eac3b34fdcd9 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Thu, 17 Nov 2016 00:18:17 +0800 Subject: [PATCH] internal/util: move the case 'latin1' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make the `case 'latin1':` near by `case 'binary':`. PR-URL: https://github.com/nodejs/node/pull/9646 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Roman Reiss Reviewed-By: Michaƫl Zasso --- lib/internal/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: