Skip to content

Commit

Permalink
lib: update encoding sets in WHATWG API
Browse files Browse the repository at this point in the history
  • Loading branch information
pluris committed Sep 13, 2023
1 parent 6a577bc commit 5808a1f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/internal/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ const empty = new Uint8Array(0);

const encodings = new SafeMap([
['unicode-1-1-utf-8', 'utf-8'],
['unicode-11utf8', 'utf-8'],
['unicode-20utf8', 'utf-8'],
['unicode11utf8', 'utf-8'],
['unicode20utf8', 'utf-8'],
['utf8', 'utf-8'],
['utf-8', 'utf-8'],
['x-unicode20utf8', 'utf-8'],
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-whatwg-encoding-custom-internals.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const { getEncodingFromLabel } = require('internal/encoding');
const mappings = {
'utf-8': [
'unicode-1-1-utf-8',
'unicode-11utf8',
'unicode-20utf8',
'unicode11utf8',
'unicode20utf8',
'utf8',
'x-unicode20utf8',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const assert = require('assert');
[
'utf-8',
'unicode-1-1-utf-8',
'unicode-11utf8',
'unicode-20utf8',
'unicode11utf8',
'unicode20utf8',
'x-unicode20utf8',
'utf8',
'unicodefffe',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-whatwg-encoding-custom-textdecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const util = require('util');
const buf = Buffer.from([0xef, 0xbb, 0xbf, 0x74, 0x65,
0x73, 0x74, 0xe2, 0x82, 0xac]);

const encoding_sets = ['unicode-1-1-utf-8', 'unicode-11utf8', 'unicode-20utf8',
const encoding_sets = ['unicode-1-1-utf-8', 'unicode11utf8', 'unicode20utf8',
'utf8', 'utf-8', 'x-unicode20utf8'];
// Make Sure TextDecoder exist
assert(TextDecoder);
Expand Down

0 comments on commit 5808a1f

Please sign in to comment.