• Home
  • Raw
  • Download

Lines Matching refs:utf8

44 bool WideToUTF8(const wchar_t* utf16, const size_t size, std::string* utf8) {  in WideToUTF8()  argument
45 utf8->clear(); in WideToUTF8()
71 utf8->resize(chars_required); in WideToUTF8()
74 &(*utf8)[0], chars_required, NULL, in WideToUTF8()
80 utf8->clear(); 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
109 const int chars_required = MultiByteToWideChar(CP_UTF8, flags, utf8, size, in UTF8ToWideWithFlags()
119 const int result = MultiByteToWideChar(CP_UTF8, flags, utf8, size, in UTF8ToWideWithFlags()
132 bool UTF8ToWide(const char* utf8, const size_t size, std::wstring* utf16) { in UTF8ToWide() argument
134 if (UTF8ToWideWithFlags(utf8, size, utf16, MB_ERR_INVALID_CHARS)) { in UTF8ToWide()
142 (void)UTF8ToWideWithFlags(utf8, size, utf16, 0); in UTF8ToWide()
147 bool UTF8ToWide(const char* utf8, std::wstring* utf16) { in UTF8ToWide() argument
149 return UTF8ToWide(utf8, strlen(utf8), utf16); in UTF8ToWide()
152 bool UTF8ToWide(const std::string& utf8, std::wstring* utf16) { in UTF8ToWide() argument
155 return UTF8ToWide(utf8.c_str(), utf8.length(), utf16); in UTF8ToWide()
162 bool UTF8PathToWindowsLongPath(const char* utf8, std::wstring* utf16) { in UTF8PathToWindowsLongPath() argument
163 if (!UTF8ToWide(utf8, utf16)) { in UTF8PathToWindowsLongPath()
182 namespace utf8 { namespace