Lines Matching refs:encoding
7 section.encodings.filter(function(encoding) {
8 return encoding.name !== 'replacement';
9 }).forEach(function(encoding) {
10 encoding.labels.forEach(function(label) {
11 const textDecoderName = encoding.name.toLowerCase(); // ASCII names only, so safe
14 new TextDecoder(label).encoding, textDecoderName,
15 'label for encoding should match');
17 new TextDecoder(label.toUpperCase()).encoding, textDecoderName,
21 new TextDecoder(ws + label).encoding, textDecoderName,
22 'label for encoding with leading whitespace should match');
24 new TextDecoder(label + ws).encoding, textDecoderName,
25 'label for encoding with trailing whitespace should match');
27 new TextDecoder(ws + label + ws).encoding, textDecoderName,
28 'label for encoding with surrounding whitespace should match');
30 }, label + ' => ' + encoding.name);