Home
last modified time | relevance | path

Searched refs:encoding (Results 1 – 25 of 2910) sorted by relevance

12345678910>>...117

/third_party/node/src/api/
Dencoding.cc13 enum encoding ParseEncoding(const char* encoding, in ParseEncoding() argument
14 enum encoding default_encoding) { in ParseEncoding()
15 switch (encoding[0]) { in ParseEncoding()
19 if (encoding[1] == 't' && encoding[2] == 'f') { in ParseEncoding()
21 const size_t skip = encoding[3] == '-' ? 4 : 3; in ParseEncoding()
22 if (encoding[skip] == '8' && encoding[skip + 1] == '\0') in ParseEncoding()
24 if (strncmp(encoding + skip, "16le", 5) == 0) in ParseEncoding()
27 } else if (encoding[1] == 'c' && encoding[2] == 's') { in ParseEncoding()
28 const size_t skip = encoding[3] == '-' ? 4 : 3; in ParseEncoding()
29 if (encoding[skip] == '2' && encoding[skip + 1] == '\0') in ParseEncoding()
[all …]
/third_party/mesa3d/src/amd/compiler/
Daco_assembler.cpp114 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/
Dtest-whatwg-encoding-custom-textdecoder-fatal.js14 { 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 …]
Dtest-fs-realpath-buffer-encoding.js13 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 …]
Dtest-buffer-write.js36 .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 …]
Dtest-buffer-tostring.js12 .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/
Dtextdecoder-fatal-single-byte.any.js6 {encoding: 'IBM866', bad: []}, property
7 {encoding: 'ISO-8859-2', bad: []}, property
8 {encoding: 'ISO-8859-3', bad: [0xA5, 0xAE, 0xBE, 0xC3, 0xD0, 0xE3, 0xF0]}, property
9 {encoding: 'ISO-8859-4', bad: []}, property
10 {encoding: 'ISO-8859-5', bad: []}, property
11 …{encoding: 'ISO-8859-6', bad: [0xA1, 0xA2, 0xA3, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAE, 0… property
12 {encoding: 'ISO-8859-7', bad: [0xAE, 0xD2, 0xFF]}, property
13 …{encoding: 'ISO-8859-8', bad: [0xA1, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0… property
14 …{encoding: 'ISO-8859-8-I', bad: [0xA1, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8,… property
15 {encoding: 'ISO-8859-10', bad: []}, property
[all …]
Dtextdecoder-fatal.any.js4 { 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 …]
Dtextdecoder-labels.any.js6 section.encodings.filter(function(encoding) { argument
7 return encoding.name !== 'replacement';
8 }).forEach(function(encoding) { argument
9 encoding.labels.forEach(function(label) {
10 const textDecoderName = encoding.name.toLowerCase(); // ASCII names only, so safe
13 new TextDecoder(label).encoding, textDecoderName,
16 new TextDecoder(label.toUpperCase()).encoding, textDecoderName,
20 new TextDecoder(ws + label).encoding, textDecoderName,
23 new TextDecoder(label + ws).encoding, textDecoderName,
26 new TextDecoder(ws + label + ws).encoding, textDecoderName,
[all …]
/third_party/node/lib/internal/crypto/
Ddiffiehellman.js71 const encoding = getDefaultEncoding();
72 keyEncoding = keyEncoding || encoding;
73 genEncoding = genEncoding || encoding;
118 function dhGenerateKeys(encoding) { argument
120 encoding = encoding || getDefaultEncoding();
121 return encode(keys, encoding);
130 const encoding = getDefaultEncoding();
131 inEnc = inEnc || encoding;
132 outEnc = outEnc || encoding;
144 function dhGetPrime(encoding) { argument
[all …]
/third_party/node/deps/npm/node_modules/iconv-lite/lib/
Dextend-node.js38 SlowBuffer.prototype.toString = function(encoding, start, end) { argument
39 encoding = String(encoding || 'utf8').toLowerCase();
42 if (Buffer.isNativeEncoding(encoding))
43 return original.SlowBufferToString.call(this, encoding, start, end);
48 return iconv.decode(this.slice(start, end), encoding);
52 SlowBuffer.prototype.write = function(string, offset, length, encoding) { argument
57 encoding = length;
61 var swap = encoding;
62 encoding = offset;
77 encoding = String(encoding || 'utf8').toLowerCase();
[all …]
/third_party/flutter/skia/third_party/externals/sfntly/cpp/src/test/tinyxml/
Dtinyxmlparser.cpp175 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/skia/third_party/externals/sfntly/cpp/src/test/tinyxml/
Dtinyxmlparser.cpp175 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/PyYAML/tests/lib/
Dtest_input_output.py57 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/
Dcodecs.c87 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/
Dbuffer.js373 Buffer.alloc = function alloc(size, fill, encoding) { argument
377 return _fill(buf, fill, 0, buf.length, encoding);
445 function fromString(string, encoding) { argument
447 if (typeof encoding !== 'string' || encoding.length === 0) {
451 encoding = undefined;
453 ops = getEncodingOps(encoding);
455 throw new ERR_UNKNOWN_ENCODING(encoding);
543 Buffer.isEncoding = function isEncoding(encoding) { argument
544 return typeof encoding === 'string' && encoding.length !== 0 &&
545 normalizeEncoding(encoding) !== undefined;
[all …]
/third_party/node/deps/npm/node_modules/byline/lib/
Dbyline.js77 if (!self.encoding) {
80 self.encoding = src._readableState.encoding;
87 LineStream.prototype._transform = function(chunk, encoding, done) { argument
89 encoding = encoding || 'utf8';
92 if (encoding == 'buffer') {
94 encoding = 'utf8';
97 chunk = chunk.toString(encoding);
100 this._chunkEncoding = encoding;
117 this._pushBuffer(encoding, 1, done);
120 LineStream.prototype._pushBuffer = function(encoding, keep, done) { argument
[all …]
/third_party/libxml2/
DHTMLtree.c53 const xmlChar *encoding; in htmlGetMetaEncoding() local
130 encoding = xmlStrstr(content, BAD_CAST"charset="); in htmlGetMetaEncoding()
131 if (encoding == NULL) in htmlGetMetaEncoding()
132 encoding = xmlStrstr(content, BAD_CAST"Charset="); in htmlGetMetaEncoding()
133 if (encoding == NULL) in htmlGetMetaEncoding()
134 encoding = xmlStrstr(content, BAD_CAST"CHARSET="); in htmlGetMetaEncoding()
135 if (encoding != NULL) { in htmlGetMetaEncoding()
136 encoding += 8; in htmlGetMetaEncoding()
138 encoding = xmlStrstr(content, BAD_CAST"charset ="); in htmlGetMetaEncoding()
139 if (encoding == NULL) in htmlGetMetaEncoding()
[all …]
/third_party/node/deps/npm/node_modules/sorted-union-stream/node_modules/readable-stream/lib/
D_stream_writable.js44 function WriteReq(chunk, encoding, cb) { argument
46 this.encoding = encoding;
190 Writable.prototype.write = function(chunk, encoding, cb) { argument
194 if (util.isFunction(encoding)) {
195 cb = encoding;
196 encoding = null;
200 encoding = 'buffer';
201 else if (!encoding)
202 encoding = state.defaultEncoding;
211 ret = writeOrBuffer(this, state, chunk, encoding, cb);
[all …]
/third_party/icu/tools/unicodetools/com/ibm/rbm/
DResources.java151 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/sorted-union-stream/node_modules/string_decoder/
Dindex.js25 || function(encoding) {
26 switch (encoding && encoding.toLowerCase()) {
33 function assertEncoding(encoding) { argument
34 if (encoding && !isBufferEncoding(encoding)) {
35 throw new Error('Unknown encoding: ' + encoding);
47 var StringDecoder = exports.StringDecoder = function(encoding) {
48 this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
49 assertEncoding(encoding);
50 switch (this.encoding) {
112 charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
[all …]
/third_party/python/Lib/test/
Dtest_codecs.py75 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/
Dcodecs.h58 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/icu/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/
DPerfTest.java86 protected String encoding; field in PerfTest
451 encoding = ""; in parseOptions()
522 if (options[ENCODING].doesOccur) encoding = options[ENCODING].value; in parseOptions()
818 String encoding; field in PerfTest.BOMFreeReader
846 public BOMFreeReader(InputStream in, String encoding) throws IOException { in BOMFreeReader() argument
848 this.encoding = encoding; in BOMFreeReader()
858 …reader = (encoding == null) ? new InputStreamReader(pushback) : new InputStreamReader(pushback, en… in BOMFreeReader()
874 …if ((encoding == null || "UTF-16BE".equals(encoding)) && start[0] == (byte) 0xFE && start[1] == (b… in detectBOMLength()
875 if (encoding == null) this.encoding = "UTF-16BE"; in detectBOMLength()
878 if ((encoding == null || "UTF-32LE".equals(encoding)) && start[2] == (byte) 0x00 in detectBOMLength()
[all …]
/third_party/node/deps/npm/node_modules/from2/node_modules/readable-stream/lib/
D_stream_writable.js36 function WriteReq(chunk, encoding, cb) { argument
38 this.encoding = encoding;
314 Writable.prototype.write = function (chunk, encoding, cb) { argument
323 if (typeof encoding === 'function') {
324 cb = encoding;
325 encoding = null;
328 if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
334 ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
356 Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { argument
358 if (typeof encoding === 'string') encoding = encoding.toLowerCase();
[all …]

12345678910>>...117