/third_party/skia/modules/skunicode/include/ |
D | SkUnicode.h | 140 static SkString convertUtf16ToUtf8(const char16_t * utf16, int utf16Units) { in convertUtf16ToUtf8() argument 142 int utf8Units = SkUTF::UTF16ToUTF8(nullptr, 0, (uint16_t*)utf16, utf16Units); in convertUtf16ToUtf8() 148 …SkDEBUGCODE(int dstLen =) SkUTF::UTF16ToUTF8(utf8.data(), utf8Units, (uint16_t*)utf16, utf16Units); in convertUtf16ToUtf8() 154 static SkString convertUtf16ToUtf8(const std::u16string& utf16) { in convertUtf16ToUtf8() argument 155 return convertUtf16ToUtf8(utf16.c_str(), utf16.size()); in convertUtf16ToUtf8() 166 SkAutoTArray<uint16_t> utf16(utf16Units); in convertUtf8ToUtf16() 167 SkDEBUGCODE(int dstLen =) SkUTF::UTF8ToUTF16(utf16.data(), utf16Units, utf8, utf8Units); in convertUtf8ToUtf16() 170 return std::u16string((char16_t *)utf16.data(), utf16Units); in convertUtf8ToUtf16() 193 void forEachCodepoint(const char16_t* utf16, int32_t utf16Units, Callback&& callback) { in forEachCodepoint() argument 194 const char16_t* current = utf16; in forEachCodepoint() [all …]
|
/third_party/skia/experimental/sktext/tests/ |
D | ShapedText.cpp | 45 std::u16string utf16(u"Hello world\nHello world"); in UNIX_ONLY_TEST() local 46 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 49 FontBlock fontBlock(utf16.size(), sk_ref_sp<FontChain>(fontChain)); in UNIX_ONLY_TEST() 54 auto newLine = utf16.find_first_of(u"\n"); in UNIX_ONLY_TEST() 64 std::u16string utf16(u"\u202EHELLO WORLD\nHELLO WORLD"); in UNIX_ONLY_TEST() local 65 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 68 FontBlock fontBlock(utf16.size(), fontChain); in UNIX_ONLY_TEST() 73 auto newLine = utf16.find_first_of(u"\n"); in UNIX_ONLY_TEST()
|
D | FontResolvedText.cpp | 45 std::u16string utf16(u"Hello world"); in UNIX_ONLY_TEST() local 46 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 49 FontBlock fontBlock(utf16.size(), sk_ref_sp<FontChain>(fontChain)); in UNIX_ONLY_TEST() 55 REPORTER_ASSERT(reporter, resolvedFonts.front().textRange.width() == utf16.size()); in UNIX_ONLY_TEST() 65 std::u16string utf16(u"English English 字典 字典 "); in UNIX_ONLY_TEST() local 66 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 69 FontBlock fontBlock(utf16.size(), sk_ref_sp<FontChain>(fontChain)); in UNIX_ONLY_TEST() 83 REPORTER_ASSERT(reporter, resolvedFonts[7].textRange.fEnd == utf16.size()); in UNIX_ONLY_TEST()
|
D | SelectableText.cpp | 98 …std::u16string utf16(u" Leading spaces\nTrailing spaces \nLong text with collapsed spac… in UNIX_ONLY_TEST() local 99 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 102 FontBlock fontBlock(utf16.size(), fontChain); in UNIX_ONLY_TEST() 146 …std::u16string utf16(u" Leading spaces\nTrailing spaces \nLong text with collapsed spac… in UNIX_ONLY_TEST() local 147 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 150 FontBlock fontBlock(utf16.size(), fontChain); in UNIX_ONLY_TEST() 176 REPORTER_ASSERT(reporter, lastPosition.fTextRange == TextRange(utf16.size(), utf16.size())); in UNIX_ONLY_TEST() 188 std::u16string utf16(u" Small Text \n"); in UNIX_ONLY_TEST() local 189 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 192 FontBlock fontBlock(utf16.size(), fontChain); in UNIX_ONLY_TEST() [all …]
|
D | WrappedText.cpp | 96 …std::u16string utf16(u" Leading spaces\nTrailing spaces \nLong text with collapsed spac… in UNIX_ONLY_TEST() local 97 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 100 FontBlock fontBlock(utf16.size(), fontChain); in UNIX_ONLY_TEST() 117 auto break1 = utf16.find_first_of(u"\n"); in UNIX_ONLY_TEST() 118 auto break2 = utf16.find_last_of(u"\n"); in UNIX_ONLY_TEST() 145 …std::u16string utf16(u"يَهْدِيْكُمُ اللَّهُ وَيُصْلِحُ بَالَكُمُيَهْدِيْكُمُ اللَّهُ وَيُصْلِحُ بَ… in UNIX_ONLY_TEST() local 146 …UnicodeText unicodeText(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size())… in UNIX_ONLY_TEST() 149 FontBlock fontBlock(utf16.size(), fontChain); in UNIX_ONLY_TEST()
|
D | UnicodeText.cpp | 57 std::u16string utf16(u"Hello word\nHello world"); in UNIX_ONLY_TEST() local 59 …UnicodeText unicodeText16(SkUnicode::Make(), SkSpan<uint16_t>((uint16_t*)utf16.data(), utf16.size(… in UNIX_ONLY_TEST() 63 auto lineBreak = utf16.find_first_of(u"\n"); in UNIX_ONLY_TEST() 74 auto space1 = utf16.find_first_of(u" "); in UNIX_ONLY_TEST() 75 auto space2 = utf16.find_last_of(u" "); in UNIX_ONLY_TEST()
|
/third_party/node/src/inspector/ |
D | node_string.cc | 17 icu::UnicodeString utf16 = icu::UnicodeString::fromUTF8( in builderAppendQuotedString() local 20 reinterpret_cast<const uint16_t*>(utf16.getBuffer()), utf16.length(), in builderAppendQuotedString() 30 icu::UnicodeString utf16 = in parseJSON() local 34 reinterpret_cast<const uint16_t*>(utf16.getBuffer()), utf16.length()); in parseJSON() 59 icu::UnicodeString utf16(unicodeSource, view.length()); in StringViewToUtf8() local 64 utf16.toUTF8(sink); in StringViewToUtf8() 111 icu::UnicodeString utf16(reinterpret_cast<const char16_t*>(data), length); in fromUTF16() 113 return utf16.toUTF8String(result); in fromUTF16() 121 icu::UnicodeString utf16 = in CharacterCount() local 123 return utf16.countChar32(); in CharacterCount()
|
/third_party/skia/src/utils/ |
D | SkUTF.cpp | 71 int SkUTF::CountUTF16(const uint16_t* utf16, size_t byteLength) { in CountUTF16() argument 72 if (!utf16 || !is_align2(intptr_t(utf16)) || !is_align2(byteLength)) { in CountUTF16() 75 const uint16_t* src = (const uint16_t*)utf16; in CountUTF16() 239 size_t SkUTF::ToUTF16(SkUnichar uni, uint16_t utf16[2]) { in ToUTF16() 244 if (utf16) { in ToUTF16() 246 utf16[0] = (uint16_t)((0xD800 - 64) + (uni >> 10)); in ToUTF16() 247 utf16[1] = (uint16_t)(0xDC00 | (uni & 0x3FF)); in ToUTF16() 249 utf16[0] = (uint16_t)uni; in ToUTF16() 269 uint16_t utf16[2]; in UTF8ToUTF16() local 270 size_t count = ToUTF16(uni, utf16); in UTF8ToUTF16() [all …]
|
/third_party/flutter/skia/src/utils/ |
D | SkUTF.cpp | 70 int SkUTF::CountUTF16(const uint16_t* utf16, size_t byteLength) { in CountUTF16() argument 71 if (!utf16 || !is_align2(intptr_t(utf16)) || !is_align2(byteLength)) { in CountUTF16() 74 const uint16_t* src = (const uint16_t*)utf16; in CountUTF16() 238 size_t SkUTF::ToUTF16(SkUnichar uni, uint16_t utf16[2]) { in ToUTF16() 243 if (utf16) { in ToUTF16() 245 utf16[0] = (uint16_t)((0xD800 - 64) + (uni >> 10)); in ToUTF16() 246 utf16[1] = (uint16_t)(0xDC00 | (uni & 0x3FF)); in ToUTF16() 248 utf16[0] = (uint16_t)uni; in ToUTF16()
|
/third_party/gstreamer/gstplugins_base/tests/check/gst/ |
D | typefindfunctions.c | 432 guint8 *utf16; in generate_utf16() local 437 utf16 = g_malloc (2 + len * 2); in generate_utf16() 438 utf16[off_lo] = 0xff; in generate_utf16() 439 utf16[off_hi] = 0xfe; in generate_utf16() 441 utf16[2 + (2 * i) + off_lo] = MANIFEST[i]; in generate_utf16() 442 utf16[2 + (2 * i) + off_hi] = 0x00; in generate_utf16() 445 return utf16; in generate_utf16() 455 guint8 *utf16; in GST_START_TEST() local 457 utf16 = generate_utf16 (0, 1); in GST_START_TEST() 459 caps = typefind_data (utf16, 2 + strlen (MANIFEST) * 2, &prob); in GST_START_TEST() [all …]
|
/third_party/gn/src/base/strings/ |
D | utf_string_conversions.cc | 175 std::string UTF16ToUTF8(std::u16string_view utf16) { in UTF16ToUTF8() argument 179 UTF16ToUTF8(utf16.data(), utf16.length(), &ret); in UTF16ToUTF8() 190 std::string UTF16ToASCII(std::u16string_view utf16) { in UTF16ToASCII() argument 191 DCHECK(IsStringASCII(utf16)) << UTF16ToUTF8(utf16); in UTF16ToASCII() 192 return std::string(utf16.begin(), utf16.end()); in UTF16ToASCII()
|
D | utf_offset_string_conversions.cc | 252 std::u16string_view utf16, in UTF16ToUTF8AndAdjustOffsets() argument 255 if (offset > utf16.length()) in UTF16ToUTF8AndAdjustOffsets() 259 PrepareForUTF8Output(utf16.data(), utf16.length(), &result); in UTF16ToUTF8AndAdjustOffsets() 261 ConvertUnicode(utf16.data(), utf16.length(), &result, &adjustments); in UTF16ToUTF8AndAdjustOffsets()
|
/third_party/flutter/skia/third_party/externals/harfbuzz/src/ |
D | hb-icu.cc | 182 UChar utf16[4], normalized[5]; in hb_icu_unicode_compose() local 189 HB_ICU_STMT (U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), a, err)); in hb_icu_unicode_compose() 191 HB_ICU_STMT (U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), b, err)); in hb_icu_unicode_compose() 195 …len = unorm2_normalize (unorm2_getNFCInstance (&icu_err), utf16, len, normalized, ARRAY_LENGTH (no… in hb_icu_unicode_compose() 242 UChar utf16[2], normalized[2 * 19/*HB_UNICODE_MAX_DECOMPOSITION_LEN*/ + 1]; in hb_icu_unicode_decompose() local 253 HB_ICU_STMT (U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), ab, err)); in hb_icu_unicode_decompose() 257 …len = unorm2_normalize (unorm2_getNFDInstance (&icu_err), utf16, len, normalized, ARRAY_LENGTH (no… in hb_icu_unicode_decompose()
|
/third_party/icu/icu4c/source/test/perf/unisetperf/ |
D | unisetperf.cpp | 213 UChar utf16[2]; in SpanUTF16() local 217 utf16[0]=(UChar)c; in SpanUTF16() 218 if(testcase.set.span(utf16, 1, USET_SPAN_CONTAINED)>0) { in SpanUTF16() 223 utf16[0]=(UChar)c; in SpanUTF16() 225 utf16[1]=(UChar)c2; in SpanUTF16() 226 if(testcase.set.span(utf16, 2, USET_SPAN_CONTAINED)>0) { in SpanUTF16() 264 UChar utf16[2]; in SpanBackUTF16() local 268 utf16[0]=(UChar)c; in SpanBackUTF16() 269 if(testcase.set.spanBack(utf16, 1, USET_SPAN_CONTAINED)==0) { in SpanBackUTF16() 274 utf16[0]=(UChar)c; in SpanBackUTF16() [all …]
|
/third_party/skia/modules/skunicode/src/ |
D | SkUnicode_icu.cpp | 86 …static std::unique_ptr<SkBidiIterator> makeBidiIterator(const uint16_t utf16[], int utf16Units, Di… in makeBidiIterator() argument 97 sk_ubidi_setPara(bidi.get(), (const UChar*)utf16, utf16Units, bidiLevel, nullptr, &status); in makeBidiIterator() 120 std::unique_ptr<uint16_t[]> utf16(new uint16_t[utf16Units]); in makeBidiIterator() local 121 SkDEBUGCODE(int dstLen =) SkUTF::UTF8ToUTF16(utf16.get(), utf16Units, utf8, utf8Units); in makeBidiIterator() 124 return makeBidiIterator(utf16.get(), utf16Units, dir); in makeBidiIterator() 285 auto utf16 = convertUtf8ToUtf16(utf8, utf8Units); in extractBidi() local 289 SkUnicodeBidi bidi(sk_ubidi_openSized(utf16.size(), 0, &status)); in extractBidi() 298 sk_ubidi_setPara(bidi.get(), (const UChar*)utf16.c_str(), utf16.size(), bidiLevel, nullptr, in extractBidi() 333 static bool extractWords(uint16_t utf16[], int utf16Units, std::vector<Position>* words) { in extractWords() argument 344 ICUUText utf16UText(sk_utext_openUChars(nullptr, (UChar*)utf16, utf16Units, &status)); in extractWords() [all …]
|
/third_party/node/tools/inspector_protocol/encoding/ |
D | encoding_test_helper.h | 26 std::basic_string<uint16_t> utf16 = v8_inspector::UTF8ToUTF16( in UTF8ToUTF16() local 28 return std::vector<uint16_t>(utf16.begin(), utf16.end()); in UTF8ToUTF16()
|
/third_party/openssl/crypto/pkcs12/ |
D | p12_utl.c | 154 static int bmp_to_utf8(char *str, const unsigned char *utf16, int len) in bmp_to_utf8() argument 163 utf32chr = (utf16[0]<<8) | utf16[1]; in bmp_to_utf8() 172 lo = (utf16[2]<<8) | utf16[3]; in bmp_to_utf8()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/ |
D | ConvertUTF.h | 292 std::error_code UTF8ToUTF16(StringRef utf8, SmallVectorImpl<wchar_t> &utf16); 294 std::error_code CurCPToUTF16(StringRef utf8, SmallVectorImpl<wchar_t> &utf16); 295 std::error_code UTF16ToUTF8(const wchar_t *utf16, size_t utf16_len, 298 std::error_code UTF16ToCurCP(const wchar_t *utf16, size_t utf16_len,
|
/third_party/skia/src/pdf/ |
D | SkPDFUtils.h | 106 uint16_t utf16[2] = {0, 0}; in WriteUTF16beHex() local 107 size_t len = SkUTF::ToUTF16(utf32, utf16); in WriteUTF16beHex() 109 SkPDFUtils::WriteUInt16BE(wStream, utf16[0]); in WriteUTF16beHex() 111 SkPDFUtils::WriteUInt16BE(wStream, utf16[1]); in WriteUTF16beHex()
|
/third_party/flutter/skia/src/pdf/ |
D | SkPDFUtils.h | 106 uint16_t utf16[2] = {0, 0}; in WriteUTF16beHex() local 107 size_t len = SkUTF::ToUTF16(utf32, utf16); in WriteUTF16beHex() 109 SkPDFUtils::WriteUInt16BE(wStream, utf16[0]); in WriteUTF16beHex() 111 SkPDFUtils::WriteUInt16BE(wStream, utf16[1]); in WriteUTF16beHex()
|
/third_party/icu/icu4c/source/test/cintltst/ |
D | ucnvseltst.c | 448 static UChar utf16[10000]; in TestSelector() local 473 u_strFromUTF8(utf16, UPRV_LENGTHOF(utf16), &length16, s, length8, &status); in TestSelector() 483 verifyResult(ucnvsel_selectForString(sel_rt, utf16, length16, &status), manual_rt); in TestSelector() 484 verifyResult(ucnvsel_selectForString(sel_fb, utf16, length16, &status), manual_fb); in TestSelector() 486 verifyResult(ucnvsel_selectForString(sel_rt, utf16, -1, &status), manual_rt); in TestSelector() 487 verifyResult(ucnvsel_selectForString(sel_fb, utf16, -1, &status), manual_fb); in TestSelector()
|
/third_party/icu/icu4c/source/samples/ucnv/ |
D | Makefile | 23 CLEANFILES += *.out data40.utf16 data41.utf16
|
/third_party/flutter/skia/third_party/externals/icu/source/samples/ucnv/ |
D | Makefile | 23 CLEANFILES += *.out data40.utf16 data41.utf16
|
/third_party/skia/third_party/externals/icu/source/samples/ucnv/ |
D | Makefile | 23 CLEANFILES += *.out data40.utf16 data41.utf16
|
/third_party/gstreamer/gstplugins_base/gst-libs/gst/tag/ |
D | id3v2frames.c | 1093 gunichar2 *utf16; in parse_insert_string_field() local 1118 utf16 = g_try_new (gunichar2, len + 1); in parse_insert_string_field() 1119 if (utf16 == NULL) in parse_insert_string_field() 1122 memcpy (utf16, data, 2 * len); in parse_insert_string_field() 1130 utf16[i] = GUINT16_SWAP_LE_BE (utf16[i]); in parse_insert_string_field() 1134 field = g_utf16_to_utf8 (utf16, len, &n_read, &size, NULL); in parse_insert_string_field() 1136 g_free (utf16); in parse_insert_string_field() 1144 utf16[i] = GUINT16_SWAP_LE_BE (utf16[i]); in parse_insert_string_field() 1150 field = g_utf16_to_utf8 (utf16, len, &n_read, &size, NULL); in parse_insert_string_field() 1151 g_free (utf16); in parse_insert_string_field()
|