Home
last modified time | relevance | path

Searched refs:utf16 (Results 1 – 25 of 119) sorted by relevance

12345

/third_party/glib/glib/tests/
Dconvert.c296 const gunichar2 *utf16, in check_utf8_to_utf16() argument
337 g_assert (result[i] == utf16[i]); in check_utf8_to_utf16()
358 g_assert (result[i] == utf16[i]); in check_utf8_to_utf16()
363 g_assert (result3[i] == utf16[i]); in check_utf8_to_utf16()
371 check_utf16_to_utf8 (const gunichar2 *utf16, in check_utf16_to_utf8() argument
383 result = g_utf16_to_utf8 (utf16, utf16_len, &items_read, &items_written, &error); in check_utf16_to_utf8()
384 if (utf16[utf16_len] == 0) in check_utf16_to_utf8()
388 result2 = g_utf16_to_utf8 (utf16, -1, &items_read2, &items_written2, &error2); in check_utf16_to_utf8()
403 result3 = g_utf16_to_utf8 (utf16, utf16_len, NULL, NULL, &error3); in check_utf16_to_utf8()
446 const gunichar2 *utf16, in check_ucs4_to_utf16() argument
[all …]
/third_party/skia/modules/skunicode/include/
DSkUnicode.h140 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/
DShapedText.cpp45 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()
DFontResolvedText.cpp45 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()
DSelectableText.cpp98 …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 …]
DWrappedText.cpp96 …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()
DUnicodeText.cpp57 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/
Dnode_string.cc17 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/glib/gio/tests/
Dwin32-appinfo.c66 const gunichar2 utf16[10]; in test_utf16_strfuncs() member
98 len = g_utf16_len (string_cases[i].utf16); in test_utf16_strfuncs()
101 str = (gunichar2 *) g_utf16_find_basename (string_cases[i].utf16, -1); in test_utf16_strfuncs()
103 g_assert_true (string_cases[i].utf16 == str); in test_utf16_strfuncs()
105 str = g_wcsdup (string_cases[i].utf16, string_cases[i].len); in test_utf16_strfuncs()
106 g_assert_cmpmem (string_cases[i].utf16, len, str, len); in test_utf16_strfuncs()
109 str = g_wcsdup (string_cases[i].utf16, -1); in test_utf16_strfuncs()
110 g_assert_cmpmem (string_cases[i].utf16, len, str, len); in test_utf16_strfuncs()
113 success = g_utf16_to_utf8_and_fold (string_cases[i].utf16, -1, NULL, NULL); in test_utf16_strfuncs()
121 success = g_utf16_to_utf8_and_fold (string_cases[i].utf16, -1, &utf8, NULL); in test_utf16_strfuncs()
[all …]
/third_party/skia/src/utils/
DSkUTF.cpp71 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/
DSkUTF.cpp70 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/gn/src/base/strings/
Dutf_string_conversions.cc175 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()
Dutf_offset_string_conversions.cc252 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/gstreamer/gstplugins_base/tests/check/gst/
Dtypefindfunctions.c432 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/flutter/skia/third_party/externals/harfbuzz/src/
Dhb-icu.cc182 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/
Dunisetperf.cpp213 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/
DSkUnicode_icu.cpp86 …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/
Dencoding_test_helper.h26 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/
Dp12_utl.c149 static int bmp_to_utf8(char *str, const unsigned char *utf16, int len) in bmp_to_utf8() argument
158 utf32chr = (utf16[0]<<8) | utf16[1]; in bmp_to_utf8()
167 lo = (utf16[2]<<8) | utf16[3]; in bmp_to_utf8()
/third_party/grpc/src/core/lib/json/
Djson_writer.cc58 void EscapeUtf16(uint16_t utf16);
133 void JsonWriter::EscapeUtf16(uint16_t utf16) { in EscapeUtf16() argument
136 OutputChar(hex[(utf16 >> 12) & 0x0f]); in EscapeUtf16()
137 OutputChar(hex[(utf16 >> 8) & 0x0f]); in EscapeUtf16()
138 OutputChar(hex[(utf16 >> 4) & 0x0f]); in EscapeUtf16()
139 OutputChar(hex[(utf16)&0x0f]); in EscapeUtf16()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DConvertUTF.h292 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/icu/icu4c/source/samples/ucnv/
DMakefile23 CLEANFILES += *.out data40.utf16 data41.utf16
/third_party/skia/third_party/externals/icu/source/samples/ucnv/
DMakefile23 CLEANFILES += *.out data40.utf16 data41.utf16
/third_party/flutter/skia/third_party/externals/icu/source/samples/ucnv/
DMakefile23 CLEANFILES += *.out data40.utf16 data41.utf16
/third_party/skia/src/pdf/
DSkPDFUtils.h106 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()

12345