Home
last modified time | relevance | path

Searched refs:utf8 (Results 1 – 8 of 8) sorted by relevance

/system/libbase/
Dutf8.cpp44 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
[all …]
Dutf8_test.cpp75 static std::wstring UTF8ToWide(const std::string& utf8) { in UTF8ToWide() argument
77 EXPECT_TRUE(UTF8ToWide(utf8, &utf16)); in UTF8ToWide()
82 std::string utf8; in WideToUTF8() local
83 EXPECT_TRUE(WideToUTF8(utf16, &utf8)); in WideToUTF8()
84 return utf8; in WideToUTF8()
123 std::ostringstream utf8; in TEST() local
124 utf8 << WideToUTF8(kConvertRoundtripCases[i]); in TEST()
126 wide << UTF8ToWide(utf8.str()); in TEST()
143 const char* utf8; in TEST() member
174 const bool success = UTF8ToWide(convert_cases[i].utf8, in TEST()
[all …]
DAndroid.bp120 "utf8.cpp",
Dfile.cpp215 using namespace android::base::utf8;
/system/libbase/include/android-base/
Dutf8.h37 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);
88 namespace utf8 {
/system/core/libutils/
DUnicode_test.cpp185 static char utf8[] = "\xc4\x00\x00\x00"; in TEST_F() local
186 ASSERT_DEATH(utf8_to_utf16_length((uint8_t *) utf8, strlen(utf8), in TEST_F()
/system/tools/aidl/
Daidl_to_cpp.cpp71 const bool utf8 = type.IsUtf8InCpp(); in RawParcelMethod() local
91 if (utf8) { in RawParcelMethod()
113 if (utf8) { in RawParcelMethod()
290 bool utf8 = type.IsUtf8InCpp(); in AddHeaders() local
310 headers->insert(utf8 ? "string" : "utils/String16.h"); in AddHeaders()
/system/libziparchive/
Dzip_archive.cc631 const int fd = ::android::base::utf8::open(fileName, O_RDONLY | O_BINARY | O_CLOEXEC, 0); in OpenArchive()