Searched refs:utf16 (Results 1 – 4 of 4) sorted by relevance
/system/libbase/ |
D | utf8.cpp | 44 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8) { in WideToUTF8() argument 63 const int chars_required = WideCharToMultiByte(CP_UTF8, flags, utf16, size, in WideToUTF8() 73 const int result = WideCharToMultiByte(CP_UTF8, flags, utf16, size, in WideToUTF8() 87 bool WideToUTF8(const wchar_t* utf16, std::string* utf8) { in WideToUTF8() argument 89 return WideToUTF8(utf16, wcslen(utf16), utf8); in WideToUTF8() 92 bool WideToUTF8(const std::wstring& utf16, std::string* utf8) { in WideToUTF8() argument 95 return WideToUTF8(utf16.c_str(), utf16.length(), utf8); in WideToUTF8() 99 static bool UTF8ToWideWithFlags(const char* utf8, const size_t size, std::wstring* utf16, in UTF8ToWideWithFlags() argument 101 utf16->clear(); in UTF8ToWideWithFlags() 117 utf16->resize(chars_required); in UTF8ToWideWithFlags() [all …]
|
D | utf8_test.cpp | 76 std::wstring utf16; in UTF8ToWide() local 77 EXPECT_TRUE(UTF8ToWide(utf8, &utf16)); in UTF8ToWide() 78 return utf16; in UTF8ToWide() 81 static std::string WideToUTF8(const std::wstring& utf16) { in WideToUTF8() argument 83 EXPECT_TRUE(WideToUTF8(utf16, &utf8)); in WideToUTF8() 207 const wchar_t* utf16; in TEST() member 243 const bool success = WideToUTF8(convert_cases[i].utf16, in TEST() 244 wcslen(convert_cases[i].utf16), in TEST() 309 static std::string UTF16ToUTF8(const string16& utf16) { in UTF16ToUTF8() argument 310 return WideToUTF8(utf16); in UTF16ToUTF8() [all …]
|
/system/libbase/include/android-base/ |
D | utf8.h | 37 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8); 41 bool WideToUTF8(const wchar_t* utf16, std::string* utf8); 45 bool WideToUTF8(const std::wstring& utf16, std::string* utf8); 49 bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16); 53 bool UTF8ToWide(const char* utf8, std::wstring* utf16); 57 bool UTF8ToWide(const std::string& utf8, std::wstring* utf16); 70 bool UTF8PathToWindowsLongPath(const char* utf8, std::wstring* utf16);
|
/system/core/adb/ |
D | sysdeps_win32.cpp | 2519 std::wstring utf16; in _console_write_utf8() local 2525 (void)android::base::UTF8ToWide(utf8, utf8_size, &utf16); in _console_write_utf8() 2538 if (!WriteConsoleW(console, utf16.c_str(), utf16.length(), &written, nullptr)) { in _console_write_utf8()
|