From f55a63c86fafaca1e760bfe1a0a3ab1b498147d2 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 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: