Skip to content

Commit

Permalink
Encoding/XMLHttpRequest: default is UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Nov 17, 2018
1 parent 7443259 commit a65bfa9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions encoding/unsupported-encodings.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
`${label} with BOM should decode as UTF-16LE`);

decode_test(label,
'%41%00%00%00%42%00%00%00',
'U+0041/U+0000/U+0000/U+0000/U+0042/U+0000/U+0000/U+0000',
`${label} with no BOM should decode as windows-1252`);;
'%41%00%00%00%42%00%00%C2%80',
'U+0041/U+0000/U+0000/U+0000/U+0042/U+0000/U+0000/U+0080',
`${label} with no BOM should decode as UTF-8`);;
});
['UTF-32be', 'utf-32be'].forEach(label => {
decode_test(label,
'%00%00%00%41%00%00%00%42',
'U+0000/U+0000/U+0000/U+0041/U+0000/U+0000/U+0000/U+0042',
`${label} with no BOM should decode as windows-1252`);
'%00%00%00%41%00%00%00%42%C2%80',
'U+0000/U+0000/U+0000/U+0041/U+0000/U+0000/U+0000/U+0042/U+0080',
`${label} with no BOM should decode as UTF-8`);

decode_test(label,
'%00%00%FE%FF%00%00%00%41%00%00%00%42',
'U+0000/U+0000/U+00FE/U+00FF/U+0000/U+0000/U+0000/U+0041/U+0000/U+0000/U+0000/U+0042',
`${label} with BOM should decode as windows-1252`);
'%00%00%FE%FF%00%00%00%41%00%C2%80%42',
'U+0000/U+0000/U+FFFD/U+FFFD/U+0000/U+0000/U+0000/U+0041/U+0000/U+0080/U+0042',
`${label} with BOM should decode as UTF-8`);
});

0 comments on commit a65bfa9

Please sign in to comment.