Searched refs:utf16 (Results 1 – 4 of 4) sorted by relevance
/system/core/base/ |
D | utf8.cpp | 42 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8) { in WideToUTF8() argument 61 const int chars_required = WideCharToMultiByte(CP_UTF8, flags, utf16, size, in WideToUTF8() 71 const int result = WideCharToMultiByte(CP_UTF8, flags, utf16, size, in WideToUTF8() 85 bool WideToUTF8(const wchar_t* utf16, std::string* utf8) { in WideToUTF8() argument 87 return WideToUTF8(utf16, wcslen(utf16), utf8); in WideToUTF8() 90 bool WideToUTF8(const std::wstring& utf16, std::string* utf8) { in WideToUTF8() argument 93 return WideToUTF8(utf16.c_str(), utf16.length(), utf8); in WideToUTF8() 97 static bool UTF8ToWideWithFlags(const char* utf8, const size_t size, std::wstring* utf16, in UTF8ToWideWithFlags() argument 99 utf16->clear(); in UTF8ToWideWithFlags() 115 utf16->resize(chars_required); in UTF8ToWideWithFlags() [all …]
|
D | utf8_test.cpp | 71 std::wstring utf16; in UTF8ToWide() local 72 EXPECT_TRUE(UTF8ToWide(utf8, &utf16)); in UTF8ToWide() 73 return utf16; in UTF8ToWide() 76 static std::string WideToUTF8(const std::wstring& utf16) { in WideToUTF8() argument 78 EXPECT_TRUE(WideToUTF8(utf16, &utf8)); in WideToUTF8() 202 const wchar_t* utf16; in TEST() member 238 const bool success = WideToUTF8(convert_cases[i].utf16, in TEST() 239 wcslen(convert_cases[i].utf16), in TEST() 304 static std::string UTF16ToUTF8(const string16& utf16) { in UTF16ToUTF8() argument 305 return WideToUTF8(utf16); in UTF16ToUTF8() [all …]
|
/system/core/base/include/android-base/ |
D | utf8.h | 35 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8); 39 bool WideToUTF8(const wchar_t* utf16, std::string* utf8); 43 bool WideToUTF8(const std::wstring& utf16, std::string* utf8); 47 bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16); 51 bool UTF8ToWide(const char* utf8, std::wstring* utf16); 55 bool UTF8ToWide(const std::string& utf8, std::wstring* utf16);
|
/system/core/adb/ |
D | sysdeps_win32.cpp | 2390 std::wstring utf16; in _console_write_utf8() local 2396 (void)android::base::UTF8ToWide(utf8, utf8_size, &utf16); in _console_write_utf8() 2409 if (!WriteConsoleW(console, utf16.c_str(), utf16.length(), &written, NULL)) { in _console_write_utf8()
|