Skip to content

Commit baf3027

Browse files
mscdextargos
authored andcommitted
lib: remove usc-2 encoding
Fixes: #21963 PR-URL: #21964 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 80b5c91 commit baf3027

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

benchmark/util/normalize-encoding.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@ const assert = require('assert');
55

66
const groupedInputs = {
77
group_common: ['undefined', 'utf8', 'utf-8', 'base64',
8-
'binary', 'latin1', 'ucs-2', 'usc-2'],
8+
'binary', 'latin1', 'ucs-2'],
99
group_upper: ['UTF-8', 'UTF8', 'UCS2', 'UTF-16LE',
10-
'UTF16LE', 'BASE64', 'UCS-2', 'USC-2'],
10+
'UTF16LE', 'BASE64', 'UCS-2'],
1111
group_uncommon: ['foo', '1', 'false', 'undefined', '[]', '{}'],
12-
group_misc: ['', 'utf16le', 'usc2', 'hex', 'HEX', 'BINARY']
12+
group_misc: ['', 'utf16le', 'hex', 'HEX', 'BINARY']
1313
};
1414

1515
const inputs = [
1616
'',
1717
'utf8', 'utf-8', 'UTF-8',
1818
'UTF8', 'Utf8', 'uTf-8', 'utF-8',
1919
'ucs2', 'UCS2', 'UcS2',
20-
'USC2', 'usc2', 'uSc2',
2120
'ucs-2', 'UCS-2', 'UcS-2',
22-
'usc-2', 'USC-2', 'uSc-2',
2321
'utf16le', 'utf-16le', 'UTF-16LE', 'UTF16LE',
2422
'binary', 'BINARY', 'latin1', 'base64', 'BASE64',
2523
'hex', 'HEX', 'foo', '1', 'false', 'undefined', '[]', '{}'];

lib/internal/util.js

-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ function slowCases(enc) {
127127
enc = `${enc}`.toLowerCase();
128128
if (enc === 'utf-8') return 'utf8';
129129
if (enc === 'ascii') return 'ascii';
130-
if (enc === 'usc-2') return 'utf16le';
131130
if (enc === 'ucs-2') return 'utf16le';
132131
break;
133132
case 6:

test/parallel/test-internal-util-normalizeencoding.js

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ const tests = [
2525
['utf-16le', 'utf16le'],
2626
['UTF-16LE', 'utf16le'],
2727
['UTF16LE', 'utf16le'],
28-
['usc-2', 'utf16le'],
29-
['USC-2', 'utf16le'],
30-
['uSc-2', 'utf16le'],
3128
['binary', 'latin1'],
3229
['BINARY', 'latin1'],
3330
['latin1', 'latin1'],

0 commit comments

Comments
 (0)