diff --git a/benchmark/util/normalize-encoding.js b/benchmark/util/normalize-encoding.js index 65cf5b1b0ce18c..73cbadff72b8ca 100644 --- a/benchmark/util/normalize-encoding.js +++ b/benchmark/util/normalize-encoding.js @@ -5,11 +5,11 @@ const assert = require('assert'); const groupedInputs = { group_common: ['undefined', 'utf8', 'utf-8', 'base64', - 'binary', 'latin1', 'ucs-2', 'usc-2'], + 'binary', 'latin1', 'ucs-2'], group_upper: ['UTF-8', 'UTF8', 'UCS2', 'UTF-16LE', - 'UTF16LE', 'BASE64', 'UCS-2', 'USC-2'], + 'UTF16LE', 'BASE64', 'UCS-2'], group_uncommon: ['foo', '1', 'false', 'undefined', '[]', '{}'], - group_misc: ['', 'utf16le', 'usc2', 'hex', 'HEX', 'BINARY'] + group_misc: ['', 'utf16le', 'hex', 'HEX', 'BINARY'] }; const inputs = [ @@ -17,9 +17,7 @@ const inputs = [ 'utf8', 'utf-8', 'UTF-8', 'UTF8', 'Utf8', 'uTf-8', 'utF-8', 'ucs2', 'UCS2', 'UcS2', - 'USC2', 'usc2', 'uSc2', 'ucs-2', 'UCS-2', 'UcS-2', - 'usc-2', 'USC-2', 'uSc-2', 'utf16le', 'utf-16le', 'UTF-16LE', 'UTF16LE', 'binary', 'BINARY', 'latin1', 'base64', 'BASE64', 'hex', 'HEX', 'foo', '1', 'false', 'undefined', '[]', '{}']; diff --git a/lib/internal/util.js b/lib/internal/util.js index 49dad0c6c35692..54f725f172df3c 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -127,7 +127,6 @@ function slowCases(enc) { enc = `${enc}`.toLowerCase(); if (enc === 'utf-8') return 'utf8'; if (enc === 'ascii') return 'ascii'; - if (enc === 'usc-2') return 'utf16le'; if (enc === 'ucs-2') return 'utf16le'; break; case 6: diff --git a/test/parallel/test-internal-util-normalizeencoding.js b/test/parallel/test-internal-util-normalizeencoding.js index 2f16d55fad247c..1fe97156ee1758 100644 --- a/test/parallel/test-internal-util-normalizeencoding.js +++ b/test/parallel/test-internal-util-normalizeencoding.js @@ -25,9 +25,6 @@ const tests = [ ['utf-16le', 'utf16le'], ['UTF-16LE', 'utf16le'], ['UTF16LE', 'utf16le'], - ['usc-2', 'utf16le'], - ['USC-2', 'utf16le'], - ['uSc-2', 'utf16le'], ['binary', 'latin1'], ['BINARY', 'latin1'], ['latin1', 'latin1'],