/third_party/rust/crates/os_str_bytes/src/windows/wtf8/ |
H A D | convert.rs | 108 surrogate: Option<NonZeroU16>, 121 surrogate: None, in new() 142 if let Some(surrogate) = self.surrogate.take() { in next() 143 return Some(Ok(surrogate.get())); in next() 155 self.surrogate = Some(unsafe { in next() 169 let additional = self.surrogate.is_some().into(); in size_hint()
|
H A D | string.rs | 15 if let Some(surrogate) = suffix.get(..SURROGATE_LENGTH) { 16 super::encode_wide(surrogate) 48 let (substring, surrogate) = prefix.split_at(index); 49 let mut wide_surrogate = super::encode_wide(surrogate);
|
H A D | code_points.rs | 17 surrogate: bool, 31 surrogate: false, 44 self.surrogate = false; in consume_next() 86 let prev_surrogate = mem::replace(&mut self.surrogate, false); in next() 106 // This condition is optimized to detect surrogate code points. in next() 110 self.surrogate = true; in next() 112 // Decoding a broken surrogate pair would be lossy. in next()
|
/third_party/icu/icu4c/source/test/intltest/ |
H A D | itercoll.cpp | 252 // setting offset in the middle of a surrogate pair in TestOffset() 253 UnicodeString surrogate = UNICODE_STRING_SIMPLE("\\ud800\\udc00str").unescape(); in TestOffset() local 254 iter = tailored.createCollationElementIterator(surrogate); in TestOffset() 256 iter->setOffset(1, status); // sets offset in the middle of surrogate in TestOffset() 259 errln("Error: setting offset in the middle of a surrogate pair should be the same as setting it to the start of the surrogate pair"); in TestOffset() 264 surrogate = UNICODE_STRING_SIMPLE("simple\\ud800\\udc00str").unescape(); in TestOffset() 265 iter = tailored.createCollationElementIterator(surrogate); in TestOffset() 268 iter->setOffset(7, status); // sets offset in the middle of surrogate in TestOffset() 271 errln("Error: setting offset in the middle of a surrogate pai in TestOffset() [all...] |
H A D | rbbitst.cpp | 5285 assertEquals(WHERE "unpaired lead surrogate", U_ILLEGAL_CHAR_FOUND , status); in TestUnpairedSurrogate() 5295 assertEquals(WHERE "unpaired tail surrogate", U_ILLEGAL_CHAR_FOUND , status); in TestUnpairedSurrogate() 5300 // make sure the surrogate one work too. in TestUnpairedSurrogate()
|
/third_party/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/ |
H A D | CollationIteratorTest.java | 283 // setting offset in the middle of a surrogate pair in TestOffset() 284 String surrogate = "\ud800\udc00str"; in TestOffset() 285 iter = tailored.getCollationElementIterator(surrogate); in TestOffset() 287 iter.setOffset(1); // sets offset in the middle of surrogate in TestOffset() 290 errln("Error: setting offset in the middle of a surrogate pair should be the same as setting it to the start of the surrogate pair"); in TestOffset() 292 surrogate = "simple\ud800\udc00str"; in TestOffset() 293 iter = tailored.getCollationElementIterator(surrogate); in TestOffset() 296 iter.setOffset(7); // sets offset in the middle of surrogate in TestOffset() 299 errln("Error: setting offset in the middle of a surrogate pai in TestOffset() [all...] |
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/collator/ |
H A D | CollationIteratorTest.java | 286 // setting offset in the middle of a surrogate pair in TestOffset() 287 String surrogate = "\ud800\udc00str"; in TestOffset() 288 iter = tailored.getCollationElementIterator(surrogate); in TestOffset() 290 iter.setOffset(1); // sets offset in the middle of surrogate in TestOffset() 293 errln("Error: setting offset in the middle of a surrogate pair should be the same as setting it to the start of the surrogate pair"); in TestOffset() 295 surrogate = "simple\ud800\udc00str"; in TestOffset() 296 iter = tailored.getCollationElementIterator(surrogate); in TestOffset() 299 iter.setOffset(7); // sets offset in the middle of surrogate in TestOffset() 302 errln("Error: setting offset in the middle of a surrogate pai in TestOffset() [all...] |
/third_party/icu/icu4c/source/i18n/ |
H A D | rematch.cpp | 370 UChar surrogate[2]; in appendReplacement() local 371 surrogate[0] = U16_LEAD(escapedChar); in appendReplacement() 372 surrogate[1] = U16_TRAIL(escapedChar); in appendReplacement() 374 destLen += utext_replace(dest, destLen, destLen, surrogate, 2, &status); in appendReplacement() 392 UChar surrogate[2]; in appendReplacement() local 393 surrogate[0] = U16_LEAD(c); in appendReplacement() 394 surrogate[1] = U16_TRAIL(c); in appendReplacement() 396 destLen += utext_replace(dest, destLen, destLen, surrogate, 2, &status); in appendReplacement() 406 UChar surrogate[2]; in appendReplacement() local 407 surrogate[ in appendReplacement() [all...] |
/third_party/node/deps/icu-small/source/i18n/ |
H A D | rematch.cpp | 370 char16_t surrogate[2]; in appendReplacement() local 371 surrogate[0] = U16_LEAD(escapedChar); in appendReplacement() 372 surrogate[1] = U16_TRAIL(escapedChar); in appendReplacement() 374 destLen += utext_replace(dest, destLen, destLen, surrogate, 2, &status); in appendReplacement() 392 char16_t surrogate[2]; in appendReplacement() local 393 surrogate[0] = U16_LEAD(c); in appendReplacement() 394 surrogate[1] = U16_TRAIL(c); in appendReplacement() 396 destLen += utext_replace(dest, destLen, destLen, surrogate, 2, &status); in appendReplacement() 406 char16_t surrogate[2]; in appendReplacement() local 407 surrogate[ in appendReplacement() [all...] |
/third_party/skia/third_party/externals/icu/source/i18n/ |
H A D | rematch.cpp | 370 UChar surrogate[2]; in appendReplacement() local 371 surrogate[0] = U16_LEAD(escapedChar); in appendReplacement() 372 surrogate[1] = U16_TRAIL(escapedChar); in appendReplacement() 374 destLen += utext_replace(dest, destLen, destLen, surrogate, 2, &status); in appendReplacement() 392 UChar surrogate[2]; in appendReplacement() local 393 surrogate[0] = U16_LEAD(c); in appendReplacement() 394 surrogate[1] = U16_TRAIL(c); in appendReplacement() 396 destLen += utext_replace(dest, destLen, destLen, surrogate, 2, &status); in appendReplacement() 406 UChar surrogate[2]; in appendReplacement() local 407 surrogate[ in appendReplacement() [all...] |
/third_party/python/Objects/ |
H A D | unicodeobject.c | 1479 will decode surrogate pairs, the other conversions are implemented as macros 1734 /* Find the maximum code point and count the number of surrogate pairs so a 3227 /* encode surrogate pair in this case */ in unicode_copy_as_widechar() 4696 * surrogate). */ 4714 Py_UCS4 surrogate = 0; in PyUnicode_DecodeUTF7Stateful() local 4747 if (surrogate) { in PyUnicode_DecodeUTF7Stateful() 4748 /* expecting a second surrogate */ in PyUnicode_DecodeUTF7Stateful() 4750 Py_UCS4 ch2 = Py_UNICODE_JOIN_SURROGATES(surrogate, outCh); in PyUnicode_DecodeUTF7Stateful() 4753 surrogate = 0; in PyUnicode_DecodeUTF7Stateful() 4757 if (_PyUnicodeWriter_WriteCharInline(&writer, surrogate) < in PyUnicode_DecodeUTF7Stateful() [all...] |
/third_party/icu/icu4c/source/test/cintltst/ |
H A D | ccapitst.c | 2120 * a high surrogate in the last position of the Unicode intermediate buffer. Apparently no in bug1() 2141 /* this happens when surrogate pair straddles the intermediate buffer in in bug1() 3681 static const UChar surrogate[1]={ 0xd900 }; in TestSubstString() local 3698 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode); in TestSubstString() 3713 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode); in TestSubstString()
|