Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit baf3027

Browse filesBrowse files
mscdextargos
authored andcommitted
lib: remove usc-2 encoding
Fixes: #21963 PR-URL: #21964 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 80b5c91 commit baf3027
Copy full SHA for baf3027

File tree

Expand file treeCollapse file tree

3 files changed

+3
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-9
lines changed
Open diff view settings
Collapse file

‎benchmark/util/normalize-encoding.js‎

Copy file name to clipboardExpand all lines: benchmark/util/normalize-encoding.js
+3-5Lines changed: 3 additions & 5 deletions
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', '[]', '{}'];
Collapse file

‎lib/internal/util.js‎

Copy file name to clipboardExpand all lines: lib/internal/util.js
-1Lines changed: 0 additions & 1 deletion
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:
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-internal-util-normalizeencoding.js
-3Lines changed: 0 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.