Home
last modified time | relevance | path

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

12345678910>>...132

/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/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 …]
Dtextencoder-constructor-non-utf.any.js5 section.encodings.forEach(function(encoding) { argument
6 if (encoding.name !== 'replacement') {
8 …assert_equals(new TextDecoder(encoding.name).encoding, encoding.name.toLowerCase()); // ASCII name…
9 }, 'Encoding argument supported for decode: ' + encoding.name);
13 assert_equals(new TextEncoder(encoding.name).encoding, 'utf-8');
14 }, 'Encoding argument not considered for encode: ' + encoding.name);
Dtextdecoder-ignorebom.any.js4 {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');
19 decoder = new TextDecoder(testCase.encoding, {ignoreBOM: false});
23 testCase.encoding + ': BOM should be absent from decoded string if not ignored');
25 decoder = new TextDecoder(testCase.encoding);
29 testCase.encoding + ': BOM should be absent from decoded string by default');
30 }, 'BOM is ignored if ignoreBOM option is specified: ' + testCase.encoding);
/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-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);
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 …]
/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/lib3/
Dtest_input_output.py54 for encoding in [None, 'utf-8', 'utf-16-be', 'utf-16-le']:
56 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode)
58 data3 = yaml.dump(value, encoding=encoding, allow_unicode=allow_unicode)
59 if encoding is not None:
61 data3 = data3.decode(encoding)
63 if encoding is None:
65 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode)
73 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode)
77 data4 = data4.decode(encoding)
79 assert isinstance(data1, str), (type(data1), encoding)
[all …]
/third_party/pyyaml/tests/lib/
Dtest_input_output.py5 def _unicode_open(file, encoding, errors='strict'): argument
6 info = codecs.lookup(encoding)
14 srw.encoding = encoding
64 for encoding in [None, 'utf-8', 'utf-16-be', 'utf-16-le']:
66 … yaml.dump(value, _unicode_open(stream, 'utf-8'), encoding=encoding, allow_unicode=allow_unicode)
68 data3 = yaml.dump(value, encoding=encoding, allow_unicode=allow_unicode)
70 yaml.dump(value, stream, encoding=encoding, allow_unicode=allow_unicode)
73 assert isinstance(data1, str), (type(data1), encoding)
75 assert isinstance(data2, str), (type(data2), encoding)
77 if encoding is None:
[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/python/Python/
Dcodecs.c62 char *encoding; in normalizestring() local
70 encoding = PyMem_Malloc(len + 1); in normalizestring()
71 if (encoding == NULL) in normalizestring()
74 if (!_Py_normalize_encoding(string, encoding, len + 1)) in normalizestring()
77 PyMem_Free(encoding); in normalizestring()
81 v = PyUnicode_FromString(encoding); in normalizestring()
82 PyMem_Free(encoding); in normalizestring()
101 PyObject *_PyCodec_Lookup(const char *encoding) in _PyCodec_Lookup() argument
103 if (encoding == NULL) { in _PyCodec_Lookup()
116 PyObject *v = normalizestring(encoding); in _PyCodec_Lookup()
[all …]
/third_party/boost/boost/spirit/home/x3/char/
Dchar_class.hpp57 typedef Encoding encoding; typedef
66 return encoding::ischar(ch) in test()
72 #define BOOST_SPIRIT_X3_CHAR_CLASS(encoding, name) \ argument
73 typedef char_class<char_encoding::encoding, name##_tag> name##_type; \
77 #define BOOST_SPIRIT_X3_CHAR_CLASSES(encoding) \ argument
78 namespace encoding \
80 BOOST_SPIRIT_X3_CHAR_CLASS(encoding, alnum) \
81 BOOST_SPIRIT_X3_CHAR_CLASS(encoding, alpha) \
82 BOOST_SPIRIT_X3_CHAR_CLASS(encoding, digit) \
83 BOOST_SPIRIT_X3_CHAR_CLASS(encoding, xdigit) \
[all …]
/third_party/gettext/gnulib-local/lib/libxml/
DHTMLtree.c81 const xmlChar *encoding; in htmlGetMetaEncoding() local
158 encoding = xmlStrstr(content, BAD_CAST"charset="); in htmlGetMetaEncoding()
159 if (encoding == NULL) in htmlGetMetaEncoding()
160 encoding = xmlStrstr(content, BAD_CAST"Charset="); in htmlGetMetaEncoding()
161 if (encoding == NULL) in htmlGetMetaEncoding()
162 encoding = xmlStrstr(content, BAD_CAST"CHARSET="); in htmlGetMetaEncoding()
163 if (encoding != NULL) { in htmlGetMetaEncoding()
164 encoding += 8; in htmlGetMetaEncoding()
166 encoding = xmlStrstr(content, BAD_CAST"charset ="); in htmlGetMetaEncoding()
167 if (encoding == NULL) in htmlGetMetaEncoding()
[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/boost/boost/property_tree/json_parser/detail/
Dparser.hpp26 explicit source(Encoding& encoding) : encoding(encoding) {} in source() argument
38 encoding.skip_introduction(cur, end); in set_input()
51 if (encoding.is_nl(*cur)) { in next()
62 bool found = cur != end && (encoding.*p)(*cur); in have()
102 Encoding& encoding; member in boost::property_tree::json_parser::detail::source
116 number_callback_adapter(Callbacks& callbacks, Encoding& encoding, in number_callback_adapter() argument
118 : callbacks(callbacks), encoding(encoding), first(cur), cur(cur) in number_callback_adapter()
124 callbacks.on_number(encoding.to_internal(first, cur)); in finish()
131 Encoding& encoding; member in boost::property_tree::json_parser::detail::number_callback_adapter
141 number_callback_adapter(Callbacks& callbacks, Encoding& encoding, in number_callback_adapter() argument
[all …]
/third_party/python/Include/
Dcodecs.h50 const char *encoding
54 const char *encoding
66 const char *encoding
81 const char *encoding,
97 const char *encoding,
116 const char *encoding,
122 const char *encoding,
128 const char *encoding,
159 const char *encoding
165 const char *encoding
[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/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 …]

12345678910>>...132