| /third_party/node/src/api/ |
| D | encoding.cc | 13 enum encoding ParseEncoding(const char* encoding, in ParseEncoding() argument 14 enum encoding default_encoding) { in ParseEncoding() 15 switch (encoding[0]) { in ParseEncoding() 23 if (encoding[1] == 't' && encoding[2] == 'f') { in ParseEncoding() 25 const size_t skip = encoding[3] == '-' ? 4 : 3; in ParseEncoding() 26 if (encoding[skip] == '8' && encoding[skip + 1] == '\0') in ParseEncoding() 28 if (strncmp(encoding + skip, "16le", 5) == 0) in ParseEncoding() 31 } else if (encoding[1] == 'c' && encoding[2] == 's') { in ParseEncoding() 32 const size_t skip = encoding[3] == '-' ? 4 : 3; in ParseEncoding() 33 if (encoding[skip] == '2' && encoding[skip + 1] == '\0') in ParseEncoding() [all …]
|
| /third_party/mesa3d/src/amd/compiler/ |
| D | aco_assembler.cpp | 114 uint32_t encoding = (0b10 << 30); in emit_instruction() local 115 encoding |= opcode << 23; in emit_instruction() 116 encoding |= !instr->definitions.empty() ? instr->definitions[0].physReg() << 16 : 0; in emit_instruction() 117 encoding |= instr->operands.size() >= 2 ? instr->operands[1].physReg() << 8 : 0; in emit_instruction() 118 encoding |= !instr->operands.empty() ? instr->operands[0].physReg() : 0; in emit_instruction() 119 out.push_back(encoding); in emit_instruction() 139 uint32_t encoding = (0b1011 << 28); in emit_instruction() local 140 encoding |= opcode << 23; in emit_instruction() 141 encoding |= !instr->definitions.empty() && !(instr->definitions[0].physReg() == scc) in emit_instruction() 146 encoding |= sopk.imm; in emit_instruction() [all …]
|
| /third_party/node/test/parallel/ |
| D | test-whatwg-encoding-custom-textdecoder-fatal.js | 14 { encoding: 'utf-8', input: [0xFF], name: 'invalid code' }, property 15 { encoding: 'utf-8', input: [0xC0], name: 'ends early' }, property 16 { encoding: 'utf-8', input: [0xE0], name: 'ends early 2' }, property 17 { encoding: 'utf-8', input: [0xC0, 0x00], name: 'invalid trail' }, property 18 { encoding: 'utf-8', input: [0xC0, 0xC0], name: 'invalid trail 2' }, property 19 { encoding: 'utf-8', input: [0xE0, 0x00], name: 'invalid trail 3' }, property 20 { encoding: 'utf-8', input: [0xE0, 0xC0], name: 'invalid trail 4' }, property 21 { encoding: 'utf-8', input: [0xE0, 0x80, 0x00], name: 'invalid trail 5' }, property 22 { encoding: 'utf-8', input: [0xE0, 0x80, 0xC0], name: 'invalid trail 6' }, property 23 { encoding: 'utf-8', input: [0xFC, 0x80, 0x80, 0x80, 0x80, 0x80], property [all …]
|
| D | test-fs-realpath-buffer-encoding.js | 13 encodings.forEach((encoding) => { 14 expected[encoding] = buffer_dir.toString(encoding); 19 let encoding; variable 20 for (encoding in expected) { 21 const expected_value = expected[encoding]; 24 result = fs.realpathSync(string_dir, { encoding }); field 27 result = fs.realpathSync(string_dir, encoding); 30 result = fs.realpathSync(buffer_dir, { encoding }); field 33 result = fs.realpathSync(buffer_dir, encoding); 38 buffer_result = fs.realpathSync(string_dir, { encoding: 'buffer' }); property [all …]
|
| D | test-buffer-write.js | 36 .forEach((encoding) => { 38 const len = Buffer.byteLength('foo', encoding); 39 assert.strictEqual(buf.write('foo', 0, len, encoding), len); 41 if (encoding.includes('-')) 42 encoding = encoding.replace('-', ''); 44 assert.deepStrictEqual(buf, resultMap.get(encoding.toLowerCase())); 48 ['base64', 'BASE64', 'base64url', 'BASE64URL'].forEach((encoding) => { 50 const len = Buffer.byteLength('Zm9v', encoding); 52 assert.strictEqual(buf.write('Zm9v', 0, len, encoding), len); 53 assert.deepStrictEqual(buf, resultMap.get(encoding.toLowerCase())); [all …]
|
| D | test-buffer-tostring.js | 12 .forEach((encoding) => { 13 assert.strictEqual(Buffer.from('foo', encoding).toString(encoding), 'foo'); 17 ['base64', 'BASE64'].forEach((encoding) => { 18 assert.strictEqual(Buffer.from('Zm9v', encoding).toString(encoding), 'Zm9v'); 22 ['hex', 'HEX'].forEach((encoding) => { 23 assert.strictEqual(Buffer.from('666f6f', encoding).toString(encoding), 29 const encoding = String(i).repeat(i); constant 33 message: `Unknown encoding: ${encoding}` 35 assert.ok(!Buffer.isEncoding(encoding)); 36 assert.throws(() => Buffer.from('foo').toString(encoding), error);
|
| /third_party/node/test/fixtures/wpt/encoding/ |
| D | textdecoder-fatal-single-byte.any.js | 15 {encoding: 'IBM866', bad: []}, property 16 {encoding: 'ISO-8859-2', bad: []}, property 17 {encoding: 'ISO-8859-3', bad: [0xA5, 0xAE, 0xBE, 0xC3, 0xD0, 0xE3, 0xF0]}, property 18 {encoding: 'ISO-8859-4', bad: []}, property 19 {encoding: 'ISO-8859-5', bad: []}, property 20 …{encoding: 'ISO-8859-6', bad: [0xA1, 0xA2, 0xA3, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAE, 0… property 21 {encoding: 'ISO-8859-7', bad: [0xAE, 0xD2, 0xFF]}, property 22 …{encoding: 'ISO-8859-8', bad: [0xA1, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0… property 23 …{encoding: 'ISO-8859-8-I', bad: [0xA1, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8,… property 24 {encoding: 'ISO-8859-10', bad: []}, property [all …]
|
| D | textdecoder-fatal.any.js | 4 { encoding: 'utf-8', input: [0xFF], name: 'invalid code' }, property 5 { encoding: 'utf-8', input: [0xC0], name: 'ends early' }, property 6 { encoding: 'utf-8', input: [0xE0], name: 'ends early 2' }, property 7 { encoding: 'utf-8', input: [0xC0, 0x00], name: 'invalid trail' }, property 8 { encoding: 'utf-8', input: [0xC0, 0xC0], name: 'invalid trail 2' }, property 9 { encoding: 'utf-8', input: [0xE0, 0x00], name: 'invalid trail 3' }, property 10 { encoding: 'utf-8', input: [0xE0, 0xC0], name: 'invalid trail 4' }, property 11 { encoding: 'utf-8', input: [0xE0, 0x80, 0x00], name: 'invalid trail 5' }, property 12 { encoding: 'utf-8', input: [0xE0, 0x80, 0xC0], name: 'invalid trail 6' }, property 13 { encoding: 'utf-8', input: [0xFC, 0x80, 0x80, 0x80, 0x80, 0x80], name: '> 0x10FFFF' }, property [all …]
|
| D | textdecoder-ignorebom.any.js | 4 {encoding: 'utf-8', bytes: [0xEF, 0xBB, 0xBF, 0x61, 0x62, 0x63]}, property 5 {encoding: 'utf-16le', bytes: [0xFF, 0xFE, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00]}, property 6 {encoding: 'utf-16be', bytes: [0xFE, 0xFF, 0x00, 0x61, 0x00, 0x62, 0x00, 0x63]} property 12 var decoder = new TextDecoder(testCase.encoding, {ignoreBOM: true}); 17 testCase.encoding + ': BOM should be present in decoded string if ignored'); 21 … testCase.encoding + ': BOM should be present in decoded string if ignored by a reused decoder'); 23 decoder = new TextDecoder(testCase.encoding, {ignoreBOM: false}); 27 testCase.encoding + ': BOM should be absent from decoded string if not ignored'); 31 …testCase.encoding + ': BOM should be absent from decoded string if not ignored by a reused decoder… 33 decoder = new TextDecoder(testCase.encoding); [all …]
|
| D | single-byte-decoder.window.js | 49 function assert_decode(data, encoding) { argument 50 if(encoding == "ISO-8859-8-I") { 51 encoding = "ISO-8859-8" 55 expectedCp = (i < 0x80) ? i : singleByteIndexes[encoding][i-0x80] 59 assert_equals(cp, expectedCp, encoding + ":" + i) 70 var encoding = singleByteEncodings[i] variable 71 for(var ii = 0, ll = encoding.labels.length; ii < ll; ii++) { 72 var label = encoding.labels[ii] 77 name = encoding.name // need scoped variable 81 }, encoding.name + ": " + label + " (XMLHttpRequest)") [all …]
|
| D | textdecoder-labels.any.js | 7 section.encodings.filter(function(encoding) { argument 8 return encoding.name !== 'replacement'; 9 }).forEach(function(encoding) { argument 10 encoding.labels.forEach(function(label) { 11 const textDecoderName = encoding.name.toLowerCase(); // ASCII names only, so safe 14 new TextDecoder(label).encoding, textDecoderName, 17 new TextDecoder(label.toUpperCase()).encoding, textDecoderName, 21 new TextDecoder(ws + label).encoding, textDecoderName, 24 new TextDecoder(label + ws).encoding, textDecoderName, 27 new TextDecoder(ws + label + ws).encoding, textDecoderName, [all …]
|
| /third_party/node/deps/npm/node_modules/minipass-collect/ |
| D | index.js | 10 write (chunk, encoding, cb) { argument 11 if (typeof encoding === 'function') 12 cb = encoding, encoding = 'utf8' 14 if (!encoding) 15 encoding = 'utf8' 17 const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding) 24 end (chunk, encoding, cb) { argument 27 if (typeof encoding === 'function') 28 cb = encoding, encoding = 'utf8' 30 this.write(chunk, encoding) [all …]
|
| /third_party/node/lib/internal/crypto/ |
| D | diffiehellman.js | 100 const encoding = getDefaultEncoding(); 101 keyEncoding = keyEncoding || encoding; 102 genEncoding = genEncoding || encoding; 149 function dhGenerateKeys(encoding) { argument 151 encoding = encoding || getDefaultEncoding(); 152 return encode(keys, encoding); 161 const encoding = getDefaultEncoding(); 162 inEnc = inEnc || encoding; 163 outEnc = outEnc || encoding; 176 function dhGetPrime(encoding) { argument [all …]
|
| /third_party/skia/third_party/externals/sfntly/cpp/src/test/tinyxml/ |
| D | tinyxmlparser.cpp | 175 void Stamp( const char* now, TiXmlEncoding encoding ); 196 void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) in Stamp() argument 262 if ( encoding == TIXML_ENCODING_UTF8 ) in Stamp() 286 if ( encoding == TIXML_ENCODING_UTF8 ) in Stamp() 314 const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) in SkipWhiteSpace() argument 320 if ( encoding == TIXML_ENCODING_UTF8 ) in SkipWhiteSpace() 401 const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) in ReadName() argument 417 && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) in ReadName() 421 && ( IsAlphaNum( (unsigned char ) *p, encoding ) in ReadName() 438 const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) in GetEntity() argument [all …]
|
| /third_party/node/deps/undici/src/node_modules/busboy/test/ |
| D | test-types-urlencoded.js | 18 encoding: 'utf-8', property 30 encoding: 'utf-8', property 42 encoding: 'utf-8', property 49 encoding: 'utf-8', property 61 encoding: 'utf-8', property 68 encoding: 'utf-8', property 80 encoding: 'utf-8', property 87 encoding: 'utf-8', property 99 encoding: 'utf-8', property 106 encoding: 'utf-8', property [all …]
|
| D | test-types-multipart.js | 43 encoding: '7bit', property 53 encoding: '7bit', property 62 encoding: '7bit', property 72 encoding: '7bit', property 104 encoding: '7bit', property 114 encoding: '7bit', property 124 encoding: '7bit', property 166 encoding: '7bit', property 175 encoding: '7bit', property 208 encoding: '7bit', property [all …]
|
| /third_party/PyYAML/tests/lib/ |
| D | test_input_output.py | 57 for encoding in [None, 'utf-8', 'utf-16-be', 'utf-16-le']: 59 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode) 61 data3 = yaml.dump(value, encoding=encoding, allow_unicode=allow_unicode) 62 if encoding is not None: 64 data3 = data3.decode(encoding) 66 if encoding is None: 68 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode) 76 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode) 80 data4 = data4.decode(encoding) 82 assert isinstance(data1, str), (type(data1), encoding) [all …]
|
| /third_party/python/Python/ |
| D | codecs.c | 87 char *encoding; in normalizestring() local 95 encoding = PyMem_Malloc(len + 1); in normalizestring() 96 if (encoding == NULL) in normalizestring() 99 if (!_Py_normalize_encoding(string, encoding, len + 1)) in normalizestring() 102 PyMem_Free(encoding); in normalizestring() 106 v = PyUnicode_FromString(encoding); in normalizestring() 107 PyMem_Free(encoding); in normalizestring() 126 PyObject *_PyCodec_Lookup(const char *encoding) in _PyCodec_Lookup() argument 128 if (encoding == NULL) { in _PyCodec_Lookup() 141 PyObject *v = normalizestring(encoding); in _PyCodec_Lookup() [all …]
|
| /third_party/node/lib/ |
| D | buffer.js | 412 Buffer.alloc = function alloc(size, fill, encoding) { argument 416 return _fill(buf, fill, 0, buf.length, encoding); 484 function fromString(string, encoding) { argument 486 if (typeof encoding !== 'string' || encoding.length === 0) { 490 encoding = undefined; 492 ops = getEncodingOps(encoding); 494 throw new ERR_UNKNOWN_ENCODING(encoding); 582 Buffer.isEncoding = function isEncoding(encoding) { argument 583 return typeof encoding === 'string' && encoding.length !== 0 && 584 normalizeEncoding(encoding) !== undefined; [all …]
|
| /third_party/icu/tools/unicodetools/com/ibm/rbm/ |
| D | Resources.java | 151 public static String getLanguage(String encoding) { in getLanguage() argument 152 if (encoding == null) return null; in getLanguage() 153 if (encoding.indexOf("_") < 0) return encoding.trim(); in getLanguage() 154 return encoding.substring(0, encoding.indexOf("_")); in getLanguage() 165 public static String getCountry(String encoding) { in getCountry() argument 166 if (encoding == null) return null; in getCountry() 167 if (encoding.indexOf("_") < 0) return null; in getCountry() 168 String result = encoding.substring(encoding.indexOf("_")+1, encoding.length()); in getCountry() 170 return result.substring(0, encoding.indexOf("_")); in getCountry() 181 public static String getVariant(String encoding) { in getVariant() argument [all …]
|
| /third_party/node/deps/npm/node_modules/negotiator/lib/ |
| D | encoding.js | 37 var encoding = parseEncoding(accepts[i].trim(), i); 39 if (encoding) { 40 accepts[j++] = encoding; 41 hasIdentity = hasIdentity || specify('identity', encoding); 42 minQuality = Math.min(minQuality, encoding.q || 1); 52 encoding: 'identity', property 73 var encoding = match[1]; 87 encoding: encoding, 98 function getEncodingPriority(encoding, accepted, index) { argument 102 var spec = specify(encoding, accepted[i], index); [all …]
|
| /third_party/python/Lib/test/ |
| D | test_codecs.py | 75 def check_state_handling_decode(self, encoding, u, s): argument 77 d = codecs.getincrementaldecoder(encoding)() 92 d = codecs.getincrementaldecoder(encoding)() 97 def check_state_handling_encode(self, encoding, u, s): argument 99 d = codecs.getincrementalencoder(encoding)() 102 d = codecs.getincrementalencoder(encoding)() 115 r = codecs.getreader(self.encoding)(q) 117 for (c, partialresult) in zip(input.encode(self.encoding), partialresults, strict=True): 126 d = codecs.getincrementaldecoder(self.encoding)() 128 for (c, partialresult) in zip(input.encode(self.encoding), partialresults, strict=True): [all …]
|
| /third_party/python/Include/ |
| D | codecs.h | 58 const char *encoding 62 const char *encoding 74 const char *encoding 89 const char *encoding, 105 const char *encoding, 124 const char *encoding, 130 const char *encoding, 136 const char *encoding, 167 const char *encoding 173 const char *encoding [all …]
|
| /third_party/node/deps/npm/node_modules/iconv-lite/lib/ |
| D | index.js | 17 iconv.encode = function encode(str, encoding, options) { argument 20 var encoder = iconv.getEncoder(encoding, options); 28 iconv.decode = function decode(buf, encoding, options) { argument 38 var decoder = iconv.getDecoder(encoding, options); 61 iconv.getCodec = function getCodec(encoding) { argument 66 var enc = iconv._canonicalizeEncoding(encoding); 78 case "string": // Direct alias to other encoding. 104 … throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); 109 iconv._canonicalizeEncoding = function(encoding) { argument 111 return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); [all …]
|
| /third_party/node/deps/npm/node_modules/node-gyp/node_modules/readable-stream/lib/ |
| D | _stream_writable.js | 31 function WriteReq(chunk, encoding, cb) { argument 33 this.encoding = encoding; 287 Writable.prototype.write = function (chunk, encoding, cb) { argument 294 if (typeof encoding === 'function') { 295 cb = encoding; 296 encoding = null; 298 if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; 302 ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); 316 Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { argument 318 if (typeof encoding === 'string') encoding = encoding.toLowerCase(); [all …]
|