Lines Matching refs:utf16

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()
118 &(*utf16)[0], chars_required); in UTF8ToWideWithFlags()
123 utf16->clear(); in UTF8ToWideWithFlags()
130 bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16) { in UTF8ToWide() argument
132 if (UTF8ToWideWithFlags(utf8, size, utf16, MB_ERR_INVALID_CHARS)) { in UTF8ToWide()
140 (void)UTF8ToWideWithFlags(utf8, size, utf16, 0); in UTF8ToWide()
145 bool UTF8ToWide(const char* utf8, std::wstring* utf16) { in UTF8ToWide() argument
147 return UTF8ToWide(utf8, strlen(utf8), utf16); in UTF8ToWide()
150 bool UTF8ToWide(const std::string& utf8, std::wstring* utf16) { in UTF8ToWide() argument
153 return UTF8ToWide(utf8.c_str(), utf8.length(), utf16); in UTF8ToWide()